Skip to main content

FAB

Inputs & Controls

FAB

Floating action button with primary and extended styles.

Usage

Expose the single most common creation action on a screen.

Highlights

  • Handles icon-only and extended label modes
  • Elevation + state layers baked in

When to use it

  • You need a persistent create shortcut.
  • Scrolling content should not hide call-to-action.

Examples

Default

Preview (Web)
import { FAB } from 'react-native-molecules/components/FAB';

export default function Example() {
  return <FAB iconName="plus" onPress={() => console.log('Create')} />;
}

Extended FAB

Preview (Web)
import { FAB } from 'react-native-molecules/components/FAB';

export default function Example() {
  return <FAB iconName="pencil-outline" label="Compose" onPress={() => console.log('Compose')} />;
}
PropTypeDefaultDescription
iconNameRequiredstring
iconType"material-community" | "feather" | undefined
iconPropsOmit<IconProps, "ref" | "name" | "type"> | undefined
labelstring | undefined
labelPropsOmit<Partial<TextProps>, "children"> | undefined
containerPropsOmit<SurfaceProps, "ref" | "style"> | undefined
innerContainerStyleViewStyle | undefined
size"sm" | "md" | "lg" | undefined
variantFABVariant | undefined
elevationMD3Elevation | undefined
stateLayerPropsViewProps | undefined
Defined in react-native-molecules/components/FAB