kosori

Button

A button triggers an action from a click, tap or keyboard input.

Button wraps the Base UI Button primitive, styles it with cva variants and marks it with data-slot.

Installation

npx shadcn@latest add @kosori/button

Example

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
button-example
import { Button } from '@/components/ui/button';

const ButtonExample = () => (
  <div className='flex flex-wrap items-center gap-2'>
    <Button>Button</Button>
    <Button variant='secondary'>Secondary</Button>
    <Button variant='outline'>Outline</Button>
    <Button variant='ghost'>Ghost</Button>
    <Button variant='destructive'>Destructive</Button>
    <Button variant='link'>Link</Button>
  </div>
);

export default ButtonExample;

On this page