Button
A button that animates what changes inside it: the label, the icon and the spinner.
npx shadcn add https://kinoui.com/r/button.jsonCopy install command
Examples
Changing the label
Render a new label and the button animates to it. Letters both labels share stay in place, and a new icon rolls in.
Variants
The six variants of the shadcn Button.
Sizes
Four sizes. Each has an icon-only twin, such as icon-sm.
Icons
Mark an icon with data-icon and it gets its own place beside the label.
Loading
loading shows a spinner and blocks presses. The button keeps focus.
Copy the invite link
Icon only
Use an icon size and give the button an aria-label.
Disabled
A disabled button fades and ignores presses.
As a link
To navigate, give a real link the button classes.
Installation
Copy code
npx shadcn@latest add https://kinoui.com/r/button.json- Files
lib/refs.tslib/reduce-motion.tslib/resize.tslib/swap.tsxcomponents/kino/spinner.tsxcomponents/kino/button.tsx- Packages
@base-ui/reactclass-variance-authority- Global CSS
- the feels, the density tokens, the shape tokens and the success and warning colours
New to Kino? Installation covers what your project needs first and the @kino namespace.
API reference
Props
Data attributes
CSS variables
Accessibility
- A loading button stays focusable, so a keyboard user keeps their place.
- A screen reader hears that the button is busy, not the result. Say the result in a
role='status'region. - A label too long for its button truncates, and the full label becomes its
title, or inside aCutTooltipits tooltip.