FloatButton

A floating interactive trigger positioned over page content for primary actions, navigation, or menus.

Preview#

Controls
import { FloatButton, FloatButtonGroup } from "raft-ui";

<FloatButton icon={<Plus />} />

Basic#

Description#

With Text#

Tooltip#

API#WIP

FloatButton Props

variantdefault: "default"
"default" | "primary" | "accent" | "outline" | "ghost" | "warning" | "danger"
Action semantics following design system tokens and themes.
shapedefault: "circle" (or "pill" when text children provided)
"circle" | "square" | "pill"
Shape of the button. Circle (icon), square (icon/desc), or pill (with text).
sizedefault: "md"
"xs" | "sm" | "md" | "lg"
Size dimensions (xs = 24px, sm = 28px, md = 32px, lg = 36px).
icon
ReactNode
Primary icon element.
description
ReactNode
Sub-label text rendered underneath the icon.
tooltip
ReactNode
Built-in Tooltip content rendered via raft-ui Tooltip.
positiondefault: "fixed" (or unpositioned if inside group)
"fixed" | "absolute" | "relative"
CSS position strategy.
sidedefault: "bottom-right"
"bottom-right" | "bottom-left" | "top-right" | "top-left"
Corner placement for positioned buttons.
offsetdefault: 16
number | string | [number | string, number | string]
Distance from viewport edges [x, y] or uniform value.
render
ReactElement | (props, state) => ReactElement
Base UI render composition prop.

FloatButtonGroup Props

directiondefault: "vertical"
"vertical" | "horizontal"
Flex layout direction for child float buttons.
attacheddefault: false
boolean
Whether child buttons are seamlessly attached without gaps.
shapedefault: "circle"
"circle" | "square" | "pill"
Shape styling for container and corner radii.
positiondefault: "fixed"
"fixed" | "absolute" | "relative"
CSS position strategy for the group container.
sidedefault: "bottom-right"
"bottom-right" | "bottom-left" | "top-right" | "top-left"
Corner placement for the group container.
offsetdefault: 16
number | string | [number | string, number | string]
Distance from edges [x, y] or uniform value.
gap
number | string
Custom spacing between buttons when not attached.