Skip to content
fayeuiStatic / 0.1.0
LLMs
API / Static edition

@fayegram-ai/faye-ui/patterns/floating-actions

Public exports and dependency-resolved component properties, with usage and rendering guidance.

Import

import { FloatingAction, FloatingActions } from '@fayegram-ai/faye-ui/patterns/floating-actions';

Usage and behavior guide · API JSON

This entry declares a client boundary. Follow the rendering guide for framework integration.

Public exports

NameKindResolved declaration type
FloatingActionvalue({ edge, className, ...props }: ButtonProps & { edge?: "start" | "end"; }) => import("react").JSX.Element
FloatingActionsvalue({ label, items, edge, direction, openOnHover, triggerProps, positionerProps, popupProps, ...rootProps }: FloatingActionsProps) => import("react").JSX.Element
FloatingActionItemtypeFloatingActionItem
FloatingActionsPropstypeFloatingActionsProps

FloatingAction

Public component; use the linked family guide for complete composition and behavior.

Dependency-resolved declaration properties. Common React/native HTML attributes are omitted from the table; use the full declaration and React/native references. Generic and union restrictions remain authoritative in TypeScript.

Properties

PropertyRequiredTypeMeaning
classNameNostring | ((state: ButtonState) => string | undefined) | undefinedCSS class applied to the element, or a function that returns a class based on the component's state.
edgeNo"start" | "end" | undefinedSee the usage contract and declaration.
endIconNoReactNodeSee the usage contract and declaration.
focusableWhenDisabledNoboolean | undefinedWhether the button should be focusable when disabled.
fullWidthNoboolean | undefinedSee the usage contract and declaration.
nativeButtonNoboolean | undefinedWhether the component renders a native <button> element when replacing it via the render prop. Set to false if the rendered element is not a button (for example, <div>).
pendingNoboolean | undefinedSee the usage contract and declaration.
pendingIndicatorNoReactNodeSee the usage contract and declaration.
pendingPositionNo"center" | "start" | "end" | undefinedCenter replaces the label without a size change; start/end reserve an indicator slot.
renderNoReactElement<unknown, string | JSXElementConstructor<any>> | ComponentRenderFn<HTMLProps, ButtonState> | undefinedAllows you to replace the component's HTML element with a different tag, or compose it with another component. Accepts a ReactElement or a function that returns the element to render.
sizeNoButtonSize | undefinedSee the usage contract and declaration.
startIconNoReactNodeDecorative slots keep artwork and labels centered with the same gap on either side.
styleNoCSSProperties | ((state: ButtonState) => React.CSSProperties | undefined) | undefinedStyle applied to the element, or a function that returns a style object based on the component's state.
toneNoButtonTone | undefinedSee the usage contract and declaration.
variantNoButtonVariant | undefinedSee the usage contract and declaration.

FloatingActions

Accessible directional action dock, with Menu owning focus, hover and dismissal.

Dependency-resolved declaration properties. Common React/native HTML attributes are omitted from the table; use the full declaration and React/native references. Generic and union restrictions remain authoritative in TypeScript.

Properties

PropertyRequiredTypeMeaning
actionsRefNoRefObject<MenuRootActions | null> | undefinedA ref to imperative actions. - unmount: Manually unmounts the menu. Call this after any externally controlled closing animation finishes. - close: When specified, the menu can be closed imperatively.
closeParentOnEscNoboolean | undefinedWhen in a submenu, determines whether pressing the Escape key closes the entire menu, or only the current child menu.
defaultOpenNoboolean | undefinedWhether the menu is initially open. To render a controlled menu, use the open prop instead.
defaultTriggerIdNostring | null | undefinedID of the trigger that the menu is associated with. This is useful in conjunction with the defaultOpen prop to create an initially open menu.
directionNo"start" | "end" | "up" | "down" | undefinedSee the usage contract and declaration.
disabledNoboolean | undefinedWhether the component should ignore user interaction.
edgeNo"start" | "end" | undefinedSee the usage contract and declaration.
handleNoMenuHandle<unknown> | undefinedA handle to associate the menu with a trigger. If specified, allows external triggers to control the menu's open state.
highlightItemOnHoverNoboolean | undefinedWhether moving the pointer over items should highlight them. Disabling this prop allows CSS :hover to be differentiated from the :focus (data-highlighted) state.
itemsYesreadonly FloatingActionItem[]See the usage contract and declaration.
labelYesstringSee the usage contract and declaration.
loopFocusNoboolean | undefinedWhether to loop keyboard focus back to the first item when the end of the list is reached while using the arrow keys.
modalNoboolean | undefinedDetermines if the menu enters a modal state when open. - true: user interaction is limited to the menu: document page scroll is locked and pointer interactions on outside elements are disabled. - false: user interaction with the rest of the document is allowed. On touch devices, a true modal blocks outside taps but leaves the page scrollable unless the popup spans nearly the full viewport width, matching native iOS behavior. Nested menus ignore this prop, and menus opened by hover are never modal.
onOpenChangeNo((open: boolean, eventDetails: MenuRoot.ChangeEventDetails) => void) | undefinedEvent handler called when the menu is opened or closed.
onOpenChangeCompleteNo((open: boolean) => void) | undefinedEvent handler called after any animations complete when the menu is opened or closed.
openNoboolean | undefinedWhether the menu is currently open.
openOnHoverNoboolean | undefinedSee the usage contract and declaration.
popupPropsNo(Omit<MenuPopupProps, "ref"> & RefAttributes<HTMLDivElement> & { variants?: { readonly size?: import("packages/faye-ui/dist/contracts/visual-variants").VisualVariant<"menu", "size"> | undefined; readonly tone?: import("packages/faye-ui/dist/contracts/visual-variants").VisualVariant<"menu", "tone"> | undefined; } | undefined; }) | undefinedSee the usage contract and declaration.
positionerPropsNo(Omit<MenuPositionerProps, "ref"> & RefAttributes<HTMLDivElement> & { variants?: { readonly size?: import("packages/faye-ui/dist/contracts/visual-variants").VisualVariant<"menu", "size"> | undefined; readonly tone?: import("packages/faye-ui/dist/contracts/visual-variants").VisualVariant<"menu", "tone"> | undefined; } | undefined; }) | undefinedSee the usage contract and declaration.
triggerIdNostring | null | undefinedID of the trigger that the menu is associated with. This is useful in conjunction with the open prop to create a controlled menu. There's no need to specify this prop when the menu is uncontrolled (that is, when the open prop is not set).
triggerPropsNo(MenuTriggerProps<unknown> & RefAttributes<HTMLElement> & { variants?: { readonly size?: import("packages/faye-ui/dist/contracts/visual-variants").VisualVariant<"menu", "size"> | undefined; readonly tone?: import("packages/faye-ui/dist/contracts/visual-variants").VisualVariant<"menu", "tone"> | undefined; } | undefined; }) | undefinedSee the usage contract and declaration.

Defaults and customization

Defaults and native behavior are documented in the linked family guide. This reference does not infer a default from an optional property.

Use semantic tokens, public part hooks and customization sheets. Keep visual configuration separate from application state.

State, events and accessibility

For interactive controls, pair a controlled value/open prop with its corresponding change callback; default props initialize uncontrolled state. Keep application validation and submission policy explicit. Name controls with visible labels, name icon-only actions on the button, and preserve focus and dismissal behavior when replacing parts. Use native form names and submit/reset types where supported. See the usage guide for component-specific behavior and live examples.

Declaration authority

Generated from packages/faye-ui/dist/patterns/floating-actions.d.ts after the semantic package build. Common native/React attributes are intentionally omitted from property tables. Generic overloads, discriminated unions and complete inherited attributes remain authoritative in installed TypeScript declarations. React DOM attributes and Base UI component contracts describe the inherited foundations.