LanternUI.Components.Button (LanternUI v0.3.2)

Copy Markdown View Source

Buttons — Fluxon-compatible API, shadcn-caliber styling.

<.button>Save</.button>
<.button variant="solid">Deploy</.button>
<.button variant="solid" color="danger">Delete</.button>
<.button size="icon"><.icon name="plus" /></.button>

The API mirrors Fluxon's button/1 (color × variant × size), so a consumer migrates by swapping imports. Styling is LanternUI's own: token-driven (--lantern-*), 32px md control height, hairline borders, coral focus ring.

Colors set a per-button --lui-c custom property; variants derive their background/border/text from it, so every color works with every variant without a compiled class matrix.

Summary

Functions

Groups buttons into a single segmented control (shared borders, joined radius).

Functions

button(assigns)

Attributes

  • color (:string) - Defaults to "primary". Must be one of "primary", "danger", "warning", "success", or "info".
  • variant (:string) - Defaults to "outline". Must be one of "solid", "soft", "surface", "outline", "dashed", or "ghost".
  • size (:string) - Defaults to "md". Must be one of "xs", "sm", "md", "lg", "xl", "icon-xs", "icon-sm", "icon-md", "icon", "icon-lg", or "icon-xl".
  • disabled (:boolean) - Defaults to false.
  • class (:any) - Defaults to nil.
  • Global attributes are accepted. Supports all globals plus: ["type", "form", "name", "value"].

Slots

  • inner_block (required)

button_group(assigns)

Groups buttons into a single segmented control (shared borders, joined radius).

Attributes

  • class (:any) - Defaults to nil.
  • Global attributes are accepted.

Slots

  • inner_block (required)