# `ShadcnUI.Components.Foundation.Button`
[🔗](https://github.com/pcharbon70/shadcn_ui/blob/main/lib/shadcn_ui/components/foundation/button.ex#L1)

Native button actions with closed shadcn-style variants and sizes.

Button renders one native `button`. The caller owns activation, submission,
duplicate prevention, authorization, request lifecycle, and command outcomes.
`loading` changes only the rendered busy presentation and never disables the
button automatically.

# `button`

Renders a native button.

Leading and trailing slots are trusted HEEX regions. Callers should mark a
purely decorative icon `aria-hidden="true"`. Icon-sized buttons require an
explicit nonblank `accessible_label`.

## Attributes

* `type` (`:string`) - Defaults to `"button"`. Must be one of `"button"`, `"submit"`, or `"reset"`.
* `variant` (`:atom`) - Defaults to `:default`. Must be one of `:default`, `:secondary`, `:destructive`, `:outline`, `:ghost`, or `:link`.
* `size` (`:atom`) - Defaults to `:default`. Must be one of `:small`, `:default`, `:large`, or `:icon`.
* `disabled` (`:boolean`) - Defaults to `false`.
* `loading` (`:boolean`) - Defaults to `false`.
* `accessible_label` (`:string`) - Accessible name override; required and nonblank for icon-only buttons. Defaults to `nil`.
* `class` (`:any`) - Defaults to `nil`.
* Global attributes are accepted. Supports all globals plus: `["autofocus", "form", "name", "value"]`.
## Slots

* `leading`
* `inner_block` (required)
* `trailing`

---

*Consult [api-reference.md](api-reference.md) for complete listing*
