Components
- Accordion
- Action Bar
- Alert Dialog
- Alert
- Announcement
- Aspect Ratio
- Autocomplete
- Avatar
- Badge
- Bottom Navigation
- Breadcrumb
- Button Group
- Button
- Calendar
- Card
- Carousel
- Chart
- Checkbox
- Circular Progress
- Circular Slider
- Clipboard
- Collapsible
- Color Picker
- Combobox
- Command
- Context Menu
- Data List
- Date Picker
- Dialog
- Drawer
- Editable
- Field
- File Upload
- Float
- Floating Panel
- Frame
- Hint
- Hover Card
- Image Cropper
- Input Group
- Input OTP
- Input
- Item
- Kbd
- Link Overlay
- Listbox
- Marquee
- Menu
- Native Select
- Number Input
- Pagination
- Popover
- Progress
- Prose
- QR Code
- Radio Group
- Rating
- Resizable
- Scroll Area
- Segment Group
- Select
- Separator
- Sheet
- Sidebar
- Signature Pad
- Skeleton
- Skip Nav
- Slider
- Spinner
- Status
- Steps
- Switch
- Table
- Tabs
- Textarea
- Timer
- Toast
- Toggle Group
- Toggle Tooltip
- Toggle
- Tooltip
- Tour
- Tree View
Installation
pnpm dlx shadcn@latest add https://shark.vini.one/r/button.json
Usage
import { Button } from "@/components/ui/button";
<Button>Button</Button>
Accessibility
- When using icon-only, add an
aria-labelprop so screen readers can identify the button’s purpose.
Link
The asChild prop renders another element with button styling.
Variants
The variant prop controls the button's visual style.
Default
Outline
Secondary
Ghost
Link
Destructive
Sizes
The size prop controls the button dimensions.
Extra Small
Small
Large
Extra Large
Pill
The pill prop creates fully rounded buttons.
Disabling click effect
The clickEffect prop disables the click animation.
State
Disabled
The disabled prop disables user interaction.
Loading
The isLoading prop displays a loading indicator.
Examples
Icon only
Create icon-only buttons using the icon-* size variants.
With icon
Icons can be placed alongside text for visual context.
Touch hitbox
For a larger tap target without changing how the button looks, use the Hitbox.
Custom color
API Reference
| Prop | Type | Default |
|---|---|---|
variant | default, outline, secondary, ghost, link, destructive | default |
size | xs, sm, md, lg, xl, icon-xs, icon-sm, icon-md, icon-lg, icon-xl | md |
clickEffect | boolean | true |
isLoading | boolean | false |