Button
Loading example…
Button is part of the Atoms set, imported from @jcsoftdev/ui/atoms.
Import
Section titled “Import”import { Button } from "@jcsoftdev/ui/atoms";Single-component entry points tree-shake to just this component: @jcsoftdev/ui/atoms/button.
<Button variant="primary" size="md"> Reservar corte</Button>| Prop | Type | Default | Description |
|---|---|---|---|
variant |
"primary" | "secondary" | "ghost" | "danger" |
"secondary" |
|
size |
"sm" | "md" |
"md" |
|
loading |
boolean |
||
asChild |
boolean |
Render the child element (via Radix Slot) instead of a <button>, e.g. a link. |
* marks a required prop.
It also accepts the native props of the element or primitive it renders (for example className, id, aria-* and event handlers).
Storybook stories
Section titled “Storybook stories”Source
Section titled “Source”packages/ui/src/atoms/button/button.tsx