Skip to content
Hazine

Buttons and Actions

3 of 40 shipped. Triggers for a single action, grouped by how the action is chosen, confirmed and reported back.

01 / Standard buttons

0 of 5 shipped

Planned 5

  • Button with Disabled Reason
  • Button with Shortcut Hint
  • Button with Count Suffix
  • Responsive Collapsing Button
  • Block Button with Description

02 / Icon and toggle buttons

0 of 5 shipped

Planned 5

  • Icon Button with Tooltip
  • Icon Button with Badge
  • Expanding Label Icon Button
  • Icon Swap Toggle Button
  • Toggle Button with Count

03 / Split and menu buttons

1 of 5 shipped
  • split and menu buttons

    A default action joined to a caret button that opens a menu of related actions, each run as soon as it is chosen. Use it when one action is the usual choice and a few alternatives must stay one step away.

    How it differs. Two focus stops in one group: the main half runs the default action, the caret is a named menu button whose items are alternative actions that run on choice, in a menu as wide as the group.

    shadcn add @hazine/split-button-menu

    Depends on button, button-group, dropdown-menu, @hazine/use-controllable-state, lucide-react

Planned 4

  • Split Button with Remembered Choice
  • Split Button with Option Toggles
  • Send or Schedule Split Button
  • Menu Button with Described Options

Planned 6

  • Responsive Action Footer
  • Mixed Control Button Group
  • Formatting Toolbar
  • Overflow Toolbar
  • Floating Selection Toolbar
  • Vertical Tool Rail

05 / Copy and share actions

1 of 5 shipped
  • copy and share actions

    Button that writes a string to the clipboard, confirms with a check icon for two seconds and announces the result. It also reports a rejected clipboard write.

    How it differs. The smallest copy primitive: one icon or icon plus label button with idle, copied and failed states, a stable name and feedback through a status region.

    shadcn add @hazine/copy-button

    Depends on button, lucide-react

Planned 4

  • Read-Only Copy Field
  • Inline Click to Copy Value
  • Share Menu
  • Share Link with Expiry

Planned 5

  • Inline Two-Step Confirm Button
  • Hold to Confirm Button
  • Acknowledgement Confirm Popover
  • Type to Confirm Field
  • Undo Window Button

07 / Async state buttons

1 of 5 shipped
  • async state buttons

    Button that runs a promise-returning handler and cycles through idle, pending, success and error by itself, swapping its icon and label. Use it for a save, send or export that settles in a few seconds.

    How it differs. The base four-state machine: width is floored at the idle measurement, presses while pending are ignored through aria-disabled so focus stays put, and every transition is announced.

    shadcn add @hazine/async-button-status-cycle

    Depends on button, @hazine/use-controllable-state, lucide-react

Planned 4

  • Progress Fill Button
  • Cancellable Async Button
  • Retry on Failure Button
  • Multi-Step Async Button

Planned 4

  • Sticky Save Bar
  • Unsaved Changes Bar
  • Floating Action Speed Dial
  • Scroll to Top with Progress