Floating Action Button
stableA prominent circular action button.
Basic usage
Examples
Circular action
Use a short accessible label when the visual child is only a symbol.
Extended action
Use extended for a prominent action that needs visible text.
Sizes and shapes
Use circular or extended variants with token colors.
Features
- Icon and extended modes.
- Button variants.
Installation
bash
pnpm dlx structyl add floating-action-buttonAPI Reference
FloatingActionButton
Prominent floating action.
| Prop | Type | Default |
|---|---|---|
| variant | 'circular' | 'extended'Shape mode. | 'circular' |
| extended | booleanAlias for variant="extended". | — |
| color | 'primary' | 'secondary' | 'destructive' | 'muted'Button color. | 'primary' |
| size | 'small' | 'medium' | 'large'Button size. | 'medium' |
| className | stringAdditional Tailwind classes merged with the component defaults. | — |