kosori

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/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 = () => <Button>Button</Button>;

export default ButtonExample;

Usage

import { Button } from '@/components/ui/button';

const ButtonDemo = () => <Button>Button</Button>;

Variants

PartPropValues
Buttonsizedefault, icon, icon-lg, icon-sm, icon-xl, icon-xs, lg, sm, xl, xs
Buttonvariantdefault, destructive, destructive-outline, ghost, link, outline, secondary

On this page