Components
- Accordion
- Action BarUpdated
- Alert Dialog
- Alert
- Announcement
- Aspect Ratio
- Autocomplete
- Avatar
- BadgeUpdated
- Bottom Navigation
- Breadcrumb
- Button Group
- Button
- CalendarUpdated
- CardUpdated
- Carousel
- Chart
- Checkbox
- Circular Progress
- Circular Slider
- Clipboard
- Collapsible
- Color Picker
- Combobox
- Command
- Context MenuUpdated
- Data List
- Date Picker
- DialogUpdated
- DrawerUpdated
- Editable
- FieldUpdated
- File Upload
- Float
- Floating Panel
- Frame
- Hint
- Hover Card
- Image Cropper
- Input Group
- Input OTP
- Input
- Item
- Kbd
- Link Overlay
- Listbox
- MarqueeUpdated
- Menu
- Native Select
- Number InputUpdated
- 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
- TableUpdated
- Tabs
- Textarea
- TimerUpdated
- ToastUpdated
- Toggle Group
- Toggle Tooltip
- Toggle
- Tooltip
- Tour
- Tree View
Hooks
Button
A button or an element styled as a button.
Installation#
pnpm dlx shadcn@latest add @shark/button
Usage#
import { Button } from "@/components/ui/button";
<Button>Button</Button>
Link#
The asChild prop renders another element with button styling.
States#
Disabled#
Loading#
Variants#
Default#
Outline#
Secondary#
Ghost#
Link#
Destructive#
Sizes#
Extra Small#
Small#
Large#
Extra Large#
Pill#
Disabling click effect#
Examples#
Icon only#
Add aria-label prop to the button so screen readers can identify the button.
With icon#
Touch hitbox#
For increasing the tap target area, use 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 |
className | string | - |
asChild | boolean | false |