Skip to content
Look

Shared with the landing page. Theme is the select beside this menu.

Button

Open .md
Live preview

Loading example…

Button is part of the Atoms set, imported from @jcsoftdev/ui/atoms.

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 "danger" | "primary" | "secondary" | "ghost" "secondary"
size "sm" | "md" | "lg" "md" sm is 30px and md (default) 38px, the heights every form control shares; lg is 52px.
loading boolean Busy state: the button keeps its focus and its full colour, ignores clicks (a submit button no longer submits, including the implicit submit from Enter in a field of its form) and is exposed as aria-disabled and aria-busy. It is not natively disabled, s…
loadingLabel string Replaces the children while loading and is announced to screen readers. Without it the children stay and the UI string loading is announced while loading.
block boolean Stretch to the full width of the container.
asChild boolean Render the child element (via Slot) instead of a <button>, e.g. a link.
intent string
intentKey string

* 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).

packages/ui/src/atoms/button/button.tsx