Elements Button
Back to Elements

Button

0 components

UI elements you can copy into your project.

API reference

Generated from each primitive's $props() declaration.

Button.Root

Interactive clickable button element with dark mode support.

Prop Type Default Description
class as className string
variant "default" | "destructive" | "outline" | "secondary" | "ghost" | "link" "default"
size "default" | "sm" | "lg" | "icon" | "icon-sm" | "icon-lg" "default"
ref bind: HTMLElement | null null
href undefined
type string "button"
disabled
children Snippet
...restProps Record<string, unknown> Remaining attributes, spread onto the underlying element.