Components
- Accordion
- Alert
- Alert Dialog
- Aspect Ratio
- Attachment
- Autocomplete
- Avatar
- Badge
- Breadcrumb
- Bubble
- Button
- Calendar
- Card
- Carousel
- Chart
- Checkbox
- Checkbox Group
- Collapsible
- Combobox
- Command
- Context Menu
- Date Picker
- Dialog
- Drawer
- Dropdown Menu
- Empty
- Field
- Fieldset
- Form
- Frame
- Group
- Input
- Input Group
- Kbd
- Label
- Menu
- Menubar
- Message
- Meter
- Number Field
- OTP Field
- Pagination
- Popover
- Preview Card
- Progress
- Questionnaire
- Radio Group
- Scroll Area
- Select
- Separator
- Sheet
- Sidebar
- Skeleton
- Slider
- Spinner
- Switch
- Table
- Tabs
- Textarea
- Toggle
- Toggle Group
- Toolbar
- Tooltip
Shared
- Artifact
- Audio Player
- Canvas
- Chain of Thought
- Checkpoint
- Code Block
- Commit
- Connection
- Context
- Controls
- Edge
- Environment Variables
- Mic Selector
- Model Selector
- Node
- Node Toolbar
- Open in Chat
- Panel
- Plan
- Prompt Input
- Queue
- Reasoning
- Sandbox
- Schema Display
- Shimmer
- Snippet
- Sources
- Speech Input
- Stack Trace
- Suggestion
- Tool
- Transcription
- Web Preview
Hooks
Resources
Commit
A git commit with its metadata and changed files.
feat(button): add the ghost variant
a1b2c3d
Gabriel Fonseca
Modifiedpackages/ui/src/components/button.tsx
423
Addedapps/storybook/stories/button.stories.tsx
18
Deletedpackages/ui/src/legacy/button.tsx
27
import {
Commit,
CommitActions,
CommitAuthor,
CommitContent,
CommitCopyButton,
CommitFile,
CommitFileAdditions,
CommitFileChanges,
CommitFileDeletions,
CommitFileInfo,
CommitFilePath,
CommitFileStatus,
CommitFiles,
CommitHash,
CommitHeader,
CommitInfo,
CommitMessage,
CommitMetadata,
CommitTimestamp,
} from "@/registry/default/shared/commit";
const files = [
{
additions: 42,
deletions: 3,
path: "packages/ui/src/components/button.tsx",
status: "modified" as const,
},
{
additions: 18,
deletions: 0,
path: "apps/storybook/stories/button.stories.tsx",
status: "added" as const,
},
{
additions: 0,
deletions: 27,
path: "packages/ui/src/legacy/button.tsx",
status: "deleted" as const,
},
];
const committedAt = new Date("2026-08-06T10:00:00Z");
export default function Particle() {
return (
<div className="w-full max-w-lg">
<Commit defaultOpen>
<CommitHeader>
<CommitInfo>
<CommitMessage>feat(button): add the ghost variant</CommitMessage>
<CommitMetadata>
<CommitHash>a1b2c3d</CommitHash>
<CommitAuthor>Gabriel Fonseca</CommitAuthor>
<CommitTimestamp date={committedAt} />
</CommitMetadata>
</CommitInfo>
<CommitActions>
<CommitCopyButton hash="a1b2c3d" />
</CommitActions>
</CommitHeader>
<CommitContent>
<CommitFiles>
{files.map((file) => (
<CommitFile key={file.path}>
<CommitFileInfo>
<CommitFileStatus status={file.status} />
<CommitFilePath>{file.path}</CommitFilePath>
</CommitFileInfo>
<CommitFileChanges>
<CommitFileAdditions count={file.additions} />
<CommitFileDeletions count={file.deletions} />
</CommitFileChanges>
</CommitFile>
))}
</CommitFiles>
</CommitContent>
</Commit>
</div>
);
}
Installation
pnpm dlx shadcn@latest add @frontal-labs/commit
Usage
import {
Commit,
CommitHeader,
CommitHash,
CommitMessage,
CommitMetadata,
CommitInfo,
CommitAuthor,
} from "@/components/commit";API Reference
| Export | Props |
|---|---|
Commit | Collapsible props |
CommitHeader | CollapsibleTrigger props |
CommitHash | <span> attributes |
CommitMessage | <span> attributes |
CommitMetadata | <div> attributes |
CommitInfo | <div> attributes |
CommitAuthor | <div> attributes |
CommitTimestamp | <time> attributes, plus its own options |
CommitActions | <div> attributes |
CommitCopyButton | Button props, plus its own options |
CommitContent | CollapsibleContent props |
CommitFiles | <div> attributes |
CommitFile | <div> attributes |
CommitFileInfo | <div> attributes |
CommitFileStatus | <span> attributes, plus its own options |
CommitFileIcon | FileIcon props |
CommitFilePath | <span> attributes |
CommitFileChanges | <div> attributes |
CommitFileAdditions | <span> attributes, plus its own options |
CommitFileDeletions | <span> attributes, plus its own options |
Open the source under Manual above for the exact prop types.
On This Page