Floating Action Button
InputAnchored floating action button with optional expanding actions menu.
Floating Action ButtonInput · Web
Loading Storybook preview…
Installation
bun add @otfdashkit/ui
Usage
Import Floating Action Button from @otfdashkit/ui.
Code
// Floating Action Button — Anchored floating action button with optional expanding actions menu.
//
// Install:
// bun add @otfdashkit/ui
import { FloatingActionButton } from '@otfdashkit/ui'
export function Example() {
return (
<FloatingActionButton>
{/* your content */}
</FloatingActionButton>
)
}Props
Props declared in the FloatingActionButton source. Inherited HTML attributes are not listed.
| Prop | Type | Default | Description |
|---|---|---|---|
| className | string | Extra className on the root wrapper. | |
| description | string | Panel subtitle shown below the title. | |
| icon | ReactNode | Icon rendered inside the FAB. Defaults to a palette icon. | |
| label | string | 'Open panel' | Tooltip / aria-label for the FAB button. |
| position | 'bottom-right' | 'bottom-left' | 'top-right' | 'top-left' | 'bottom-right' | Which corner to anchor the FAB. |
| sections | FabSection[] | [] | Sections of content to render inside the popover panel. |
| title | string | Panel title shown at the top of the popover. |