Button
v0.17.1Primary, secondary, outline, ghost, destructive and link; 36, 44 and 48 px; loading state with a delayed spinner.
API reference
Generated from the types. Every part also takes className.
Button
Also takes every prop of <button>.
- variant
"link" | "primary" | "secondary" | "outline" | "ghost" | "destructive" = "primary"- size
"sm" | "md" | "lg" | "icon" | "icon-sm" = "md"- asChild
booleanRender the child element (e.g. a link) with button styles.- loading
booleanDisables the button (no double submit) and shows a spinner after 300 ms, so quick actions never flash. It keeps its look: busy is not unavailable.