Skip to content

Select

Animated select menu with fluid hover, bordered/borderless variants, optional leading icons, and spring-animated popover.

Installation

Install Select from the Fluid Effect UI registry.

Basic

Variants

With Icons

Groups

Scrollable List

Error State

Please select a role to continue.

Disabled

API Reference

Types come from the public API. A dash indicates no default is documented here.

Select props

Public source
PropTypeDefaultDescription
keystring | undefined''The child's identity among its parent's children of one component. The empty string by default.
onEmit
Show type
((events: SelectEvents) => NoInfer<Msg> | undefined) | { readonly RequestedClose: (event: { readonly _tag: "RequestedClose"; readonly reason: "none" | "trigger-press" | "list-navigation" | "item-press" | "outside-press" | "escape-key" | "focus-out" | "close-press" | "cancel-open" | "window-resize"; }) => NoInfer<Msg> | undefined; readonly RequestedOpen: (event: { readonly _tag: "RequestedOpen"; readonly reason: "none" | "trigger-press" | "list-navigation" | "item-press" | "outside-press" | "escape-key" | "focus-out" | "close-press" | "cancel-open" | "window-resize"; }) => NoInfer<Msg> | undefined; readonly Picked: (event: { readonly _tag: "Picked"; readonly value: string | readonly string[] | null; readonly reason: "none" | "trigger-press" | "list-navigation" | "item-press" | "outside-press" | "escape-key" | "focus-out" | "close-press" | "cancel-open" | "window-resize"; }) => NoInfer<Msg> | undefined; readonly Settled: (event: { readonly _tag: "Settled"; readonly open: boolean; }) => NoInfer<Msg> | undefined; } | undefined
—Handle the child's events with a callback, or supply one handler per tag for tagged events. Return a parent message to dispatch it, or `undefined` to ignore the event.
props.openbooleanRequired
props.items
Show type
readonly { readonly label: string; readonly value: string; readonly disabled?: boolean | undefined; }[]
Required
props.formstring | undefined—
props.idstring | undefinedoptions.key
props.disabledboolean | undefined—
props.valuestring | readonly string[] | null | undefined—
props.modalboolean | undefined—
props.requiredboolean | undefined—
props.anchor
Show type
string | { readonly x: number; readonly y: number; readonly width: number; readonly height: number; } | undefined
—
props.side"bottom" | "left" | "right" | "top" | "inline-start" | "inline-end" | undefined—
props.namestring | undefined—
props.readOnlyboolean | undefined—
props.placeholderstring | undefined—
props.dismissLabelstring | undefined—
props.align"end" | "start" | "center" | undefined—
props.sideOffsetnumber | undefined—
props.alignOffsetnumber | undefined—
props.collisionAvoidance
Show type
{ readonly side?: "shift" | "none" | "flip" | undefined; readonly align?: "shift" | "none" | "flip" | undefined; readonly fallbackAxisSide?: "end" | "start" | "none" | undefined; } | undefined
—
props.collisionBoundary
Show type
"clipping-ancestors" | { readonly id: string; } | { readonly x: number; readonly y: number; readonly width: number; readonly height: number; } | undefined
—
props.collisionPadding
Show type
number | { readonly bottom?: number | undefined; readonly left?: number | undefined; readonly right?: number | undefined; readonly top?: number | undefined; } | undefined
—
props.stickyboolean | undefined—
props.arrowPaddingnumber | undefined—
props.positionMethod"fixed" | "absolute" | undefined—
props.disableAnchorTrackingboolean | undefined—
props.topLayerboolean | undefined—
props.multipleboolean | undefined—
props.autoCompletestring | undefined—
props.highlightItemOnHoverboolean | undefined—
props.alignItemWithTriggerboolean | undefined—
props.finalFocusboolean | undefined—
props.holdExitboolean | undefined—
sizeSizeVariant'default'
shapeShapeVariant'rounded'
surfacenumber1
reducedMotion"user" | "always" | "never"'user'
classNamestring—
contentClassNamestring—
groupsreadonly { readonly label: string; readonly values: ReadonlyArray<string>; }[]—
ariaLabelstringRequired
variant"default" | "borderless"—
invalidboolean—
errorstring—
triggerClassNamestring—
triggerIconView.Content<Msg, R>—Render the trigger as a Fluid icon button. The selected value stays available in the listbox.
triggerTooltipstring
Varies
  • options.ariaLabel
  • selectedLabel
triggerDescribedBystring—IDs that describe the trigger in addition to its own error feedback.
leadingView.Content<Msg, R> | undefined—
renderIcon(item: SelectProps["items"][number]) => View.Content<Msg, R> | undefined—