Button
A button or a component that looks like a button.
Button composes Base UI's useRender and mergeProps with cva variants,
renders Spinner as its loading indicator and marks itself
with data-slot.
Installation
npx shadcn@latest add @kosori/buttonExample
The Example below is a registry:example item, built and validated by the same
pipeline as Button. Its source is the file @kosori/button-example installs, so
the preview and the install cannot drift.
button-example.tsx
import { Button } from '@/components/ui/button';
const ButtonExample = () => <Button>Button</Button>;
export default ButtonExample;
Usage
import { Button } from '@/components/ui/button';
const ButtonDemo = () => <Button>Button</Button>;Variants
| Part | Prop | Values |
|---|---|---|
Button | size | default, icon, icon-lg, icon-sm, icon-xl, icon-xs, lg, sm, xl, xs |
Button | variant | default, destructive, destructive-outline, ghost, link, outline, secondary |