Actions
Floating button
floats OVER the scroll (a Button flows with it) · Material calls it a FAB · icon label? variant position · one per screen
function FloatingButtonDemo() { return ( <View className="flex-row items-center gap-3"> <FloatingButton icon={PlusIcon} accessibilityLabel="Add" /> <FloatingButton icon={PlusIcon} label="Primary" /> <FloatingButton icon={PlusIcon} label="Secondary" variant="secondary" /> </View> );}Usage
Floats over the scroll instead of sitting in it, so the screen’s one most important action stays reachable however far down you are. A Button flows with the content; this does not. Material calls it a FAB. One per screen.
API
<FloatingButton icon label? variant="primary|secondary" position="inline|bottom-right|bottom-center" />Get it
Already in every copy of the native kit:
import { FloatingButton } from '@/components/kit/floating-button';Details
- Exports
FloatingButton- Packages
- lucide-react-native@^1.21.0
- Installs with
- @halftone-native/icon, @halftone-native/lib-utils, @halftone-native/text
- Also searched as
- fab, floating action button, plus, extended, add button
- Registry JSON
- /r/native/floating-button.json
<div className="flex w-full flex-col gap-6"> <Row> <FloatingButton icon={PlusIcon} aria-label="New invoice" onClick={() => toast('Would start an invoice')} /> <FloatingButton icon={PencilIcon} label="Compose" onClick={() => toast('Would compose')} /> <FloatingButton icon={PlusIcon} variant="secondary" aria-label="Add" /> </Row> <div className="bg-muted-subtle relative h-48 w-72 max-w-full overflow-hidden rounded-xl border"> <div className="flex flex-col gap-2 p-4"> {[1, 2, 3].map((i) => ( <div key={i} className="bg-card h-10 rounded-md border" /> ))} </div> <FloatingButton icon={PlusIcon} position="bottom-right" aria-label="New invoice" className="right-4 bottom-4" /> </div></div>Usage
Floats over the scroll instead of sitting in it, so the page’s one most important action stays reachable. A Button flows with the content; this does not. One per page; icon-only needs an aria-label.
API
<FloatingButton icon label? variant="primary|secondary" position="inline|bottom-right|bottom-center" aria-label? />Get it
Already in every copy of the web kit:
import { FloatingButton } from '@/components/kit/floating-button';Details
- Exports
FloatingButton- Packages
- cn@^0.5.2, lucide-react@^1.52.0
- Also searched as
- fab, floating action button, plus, extended, add button
- Registry JSON
- /r/web/floating-button.json
Agents: the whole registry is at /llms.txt.