Back to docs
Component
Floating Action Button
Floating button with spring interactions and gradient fill.
Install
npx shadcn@latest add @native-bits/floating-action-buttonDependencies
react-native-reanimatedreact-native-linear-gradient
actionsnavigationmobile
Props
| Prop | Type | Default | Description |
|---|---|---|---|
| icon | ReactNode | - | Displayed icon |
| onPress | () => void | - | Press callback |
| size | number | 56 | Diameter in px |
Usage
```tsx
import { floating-action-button } from '@/components/native-bits/floating-action-button'
<FloatingActionButton icon={<PlusIcon />} onPress={openComposer} />
```Source code
Loading...