UIComponentsReact
A button, or a link or trigger that looks like one.
Built on the headless Button.See its API in Docs
Rendered by React 19.3.1
Installation
npx shadcn@4.23.0 add https://hamur.dev/r/react/button.jsonIt also adds utils. The app needs its setup first: Installation.
Usage
Pick the look with variant (default, secondary, outline, ghost, destructive, link) and the height with size; the icon sizes make a square button for an icon alone. Every other prop goes to the headless Button, so disabled and focusableWhenDisabled behave as there.
To give another part the button's look, render the part as the Button: React and Solid pass it to render, Svelte to a render snippet, Vue as a render VNode, and Angular writes uiButton on the part's element.
import { Button } from '@/components/ui/button'Examples
Variants
Each variant.
Rendered by React 19.3.1
Sizes
xs, sm, the default and lg.
Rendered by React 19.3.1
API reference
The styled parts pass every prop to the headless part they wrap and add classes. The props, data attributes and keyboard are on Button's API reference.