FAB
Category: Overlays
{ /* Icon-only, default position */}<FAB aria-label="New post" icon={<PlusIcon />} />;
{ /* Extended */}<FAB extended icon={<PlusIcon />} onClick={open}> New</FAB>;
{ /* Manually placed */}<FAB positioned={false} aria-label="Capture" icon={<CameraIcon />} />;Install: @helix-ui/core
import { FAB } from '@helix-ui/core';status: stable · since: 0.5.0
Tags: mobile, floating, primary-action, circular
Anatomy
Section titled “Anatomy”…page content… ╭─╮ │+│ ← circular FAB ╰─╯Layout
Section titled “Layout”- display —
fixed - width —
content - height —
content - intrinsicSize —
~56px circle (default), or pill in extended - stackable —
false - fullBleed —
false
Visual
Section titled “Visual”A circular brand-colored button with a centered icon, fixed to the bottom-right with safe-area padding. The extended variant becomes a pill with icon + label. Uses shadow.lg for lift.
| Name | Type | Default | Description |
|---|---|---|---|
aria-label |
string |
— | Required accessible name when icon-only (no extended label). |
tone |
'brand' | 'neutral' | 'danger' |
brand |
Color intent. |
size |
'sm' | 'md' | 'lg' |
md |
Diameter / pill height — 40 / 56 / 64 px. |
extended |
boolean |
false |
Render as a pill with icon + label child. |
positioned |
boolean |
true |
Fixed-position at bottom-right with safe-area inset; set false to place manually. |
icon |
ReactNode |
— | Icon content. |
- children — used as label only when
extended
Tokens used
Section titled “Tokens used”color.bg.action.brand.default, color.bg.action.brand.hover, color.bg.action.danger.default, color.bg.action.danger.hover, color.bg.action.neutral.default, color.bg.surface.default, color.text.on.brand, color.text.on.danger, color.text.primary, color.border.default, color.border.focus, radius.full, space.2, space.4, space.5, font.family.sans, font.size.sm, font.size.md, font.weight.semibold, shadow.lg
Accessibility
Section titled “Accessibility”Role: button
Notes
- Always provide
aria-labelfor the icon-only variant — the screen reader has no visible text. - Default placement adds
bottom: var(--helix-ui-space-4) + env(safe-area-inset-bottom)so the FAB clears the iOS home indicator and any BottomNav.
Composes with
Section titled “Composes with”| Component | Relation | Note |
|---|---|---|
SafeArea |
parent |
Wrap on mobile builds for inset. |
IconButton |
alternative |
IconButton stays inline; FAB floats. |
BottomNav |
sibling |
|
ActionSheet |
sibling |
Prompt examples
Section titled “Prompt examples”These are the AI prompt → JSX mappings used by the helix-ui prompt DSL and integrations like Cursor / Claude Code.
compose new email
Section titled “compose new email”“a floating + button in the bottom-right”
<FAB icon={<PlusIcon />} aria-label="Compose" onClick={compose} />extended FAB with label
Section titled “extended FAB with label”“pill-shaped FAB saying “New post”“
<FAB extended icon={<PlusIcon />}> New post</FAB>