Flutter docs
Default skin

FloatButton

A button that floats at the top of the page.

When to use

  • For global functionality on the site.
  • For actions that must remain available wherever the user browses.

Examples

Basic

The most basic usage.

Shape

Change the FloatButton shape.

FloatButton with tooltip

Set tooltip to explain an icon-only action.

Menu mode

Open grouped actions on hover or click.

placement

Choose top, right, bottom, or left group expansion.

BackTop

Return to the top of the page.

badge

FloatButton with Badge.

Type

Change the FloatButton type.

Content

Show a short description on a square FloatButton.

FloatButton Group

Group related floating actions and share their shape.

Controlled mode

Control a triggered group through open.

draggable

Integrate FloatButton with a third-party drag engine.

Progress ring

Display scroll progress around the BackTop edge.

Custom semantic dom styling

Customize FloatButton semantic slots.

API

FloatButton, FloatButton.Group, FloatButton.BackTop, and their props are exported from @ceebee/ui/client.

common API

PropertyDescriptionTypeDefaultVersion
iconSet the icon component of buttonReactNode-—
classNamesCustomize class for each semantic structure inside the component. Supports object or function.Record<SemanticDOM, string> | (info: { props })=> Record<SemanticDOM, string>-—
contentText and otherReactNode-—
descriptionPlease use content insteadReactNode-—
tooltipThe text shown in the tooltipReactNode | TooltipProps-TooltipProps: 5.25.0
typeSetting button typedefault | primarydefault—
shapeSetting button shapecircle | squarecircle—
stylesCustomize inline style for each semantic structure inside the component. Supports object or function.Record<SemanticDOM, CSSProperties> | (info: { props })=> Record<SemanticDOM, CSSProperties>-—
onClickSet the handler to handle click event(event) => void-—
hrefThe target of hyperlinkstring-—
targetSpecifies where to display the linked URLstring-—
htmlTypeSet the original html type of button, see: MDNsubmit | reset | buttonbutton5.21.0
badgeAttach Badge to FloatButton. status and other props related are not supported.BadgeProps-5.4.0
disabledWhether the button is disabledboolean-6.4.0

FloatButton.Group

PropertyDescriptionTypeDefaultVersion
openWhether the menu is visible or not, use it with triggerboolean-—
closeIconCustomize close button iconReact.ReactNode<CloseOutlined />—
placementCustomize menu animation placementtop | left | right | bottomtop5.21.0
shapeSetting button shape of childrencircle | squarecircle—
triggerWhich action can trigger menu open/closeclick | hover-—
onOpenChangeCallback executed when active menu is changed, use it with trigger(open: boolean) => void-—
onClickSet the handler to handle click event (only work in Menu mode)(event) => void-5.3.0

FloatButton.BackTop

PropertyDescriptionTypeDefaultVersion
durationTime to return to top (ms). This property is ignored when enables reduced motion (prefers-reduced-motion: reduce)number450—
showProgressShow the current scroll progress ring around the BackTop button edgebooleanfalse6.6.0
targetSpecifies the scrollable area dom node() => HTMLElement() => window—
visibilityHeightThe BackTop button will not show until the scroll height reaches this valuenumber400—
onClickA callback function, which can be executed when you click the button() => void-—