Skip to content

Floating Action Button

FloatingActionButton renders a primary action button anchored over content views.

Usage

FABExample.tsx
import { FloatingActionButton } from '@masumdev/rn-ui';
import { Plus } from 'lucide-react-native';
export function FABExample() {
return (
<FloatingActionButton
icon={({ color, size }) => <Plus color={color} size={size} />}
placement="bottom-right"
tone="primary"
onPress={() => console.log('Create new')}
/>
);
}

Props API

PropTypeDefaultDescription
iconRenderIconIcon render function.
placement'bottom-right' | 'bottom-left' | 'top-right' | 'top-left''bottom-right'Fixed position placement.
tone'primary' | 'secondary' | 'accent' | 'success''primary'Color tone.
size'sm' | 'md' | 'lg''md'Button size dimensions.