StellarUI

<stellar-fab>

Properties

Component
Example

Preview

A B C

Markup

Copy
<stellar-fab>
  <stellar-button tone="neutral" size="lg" shape="circle">A</stellar-button>
  <stellar-button tone="secondary" size="lg" shape="circle">B</stellar-button>
  <stellar-button tone="tertiary" size="lg" shape="circle">C</stellar-button>
</stellar-fab>

API

Complete props, events, slots, and implementation notes for the shipped floating action button.

Props

PropTypeDefaultNotes
layoutvertical | flowerverticalPorts the shipped default stack and fab-flower quarter-circle modifier into one explicit prop.
iconstringmdi:plusIcon name passed to the fallback trigger button when the trigger slot is not provided.

Events

EventSourceNotes
focus / blurslotted trigger and actionsThe open/close behavior is CSS-driven from focus state, so the slotted controls keep their normal native focus semantics.
clickslotted trigger and actionsButtons and links inside the FAB keep their native click behavior. The component does not intercept activation.
custom eventsnonestellar-fab does not emit custom events.

Slots

SlotNotes
triggerThe always-visible anchor control. Use it when you want custom text, mixed icon-plus-label content, or a different button treatment. If omitted, the component renders a fallback circular stellar-button using the icon prop.
closeOptional replacement control shown over the trigger while the FAB is open.
main-actionOptional alternate primary action shown over the trigger while the FAB is open. Use this or close, not both.
defaultThe speed-dial items. Direct children can be plain wrappers with text plus buttons, links, or shipped stellar-button controls.

Notes

  • The public tag is `stellar-fab`, and it ships as a layout container for a trigger plus slotted action items instead of another button variant.
  • The API stays small: `layout` ports the `fab-flower`-style modifier, and `icon` only exists for the fallback trigger button.
  • The component defaults to fixed bottom-end positioning by default. Override the host with normal `style` or classes when you want an inline demo or another corner.
  • Open and close behavior stays CSS-driven from focus within, so native buttons and links inside the FAB keep their normal semantics.
  • The trigger label is authored content now, not a prop. Use the `trigger` slot whenever you want visible text or custom trigger markup.
  • Named `close` and `main-action` slots map the internal part classes without reintroducing the old class API on the public surface.
  • `stellar-fab` uses `mode: 'open'` and reads exported `stellar.css` variables directly, while leaving the visual treatment of each action to the slotted controls.
  • The visual baseline follows the shipped fixed corner placement, hidden-until-open action stack, optional trigger replacement, and quarter-circle flower layout.