Skip to content
Back

Unfold selectPro

A select whose trigger grows into the list, with one gliding highlight, type-ahead, paging, an automatic search field for long lists and a value that rolls the way you moved.

oxyn add unfold-select
The code is part of Oxyn Pro

The preview stays free for everyone. Pro opens the code of every Pro component, screen, agent-app template, block and kit, plus the Pro CLI.

Get Pro

Rendered from Rust at build time · goes live when visible

When to use

  • A select whose trigger surface grows into the list.
  • The open surface starts clipped to the trigger's rectangle (radius 9) and springs to the full panel (radius 12) with a slight bounce, anchored to the start or end edge; it never gets narrower than the trigger.
  • One highlight glides between options.
  • Type-ahead jumps to a label (a repeated letter cycles; it picks while closed).

When not to use

  • On or off for things that apply right away: use Switch instead.
  • A real checkbox with a label and second line, an indeterminate state for Select all, an error, a card row and a check that draws itself: use Checkbox instead.
  • Pick one: use Radio group instead.

Installation

Unfold select is part of Oxyn Pro; the preview is free. Pro items install with the oxyn CLI once your licence is signed in; until then Pro members copy the code from this page.

Terminal
oxyn add unfold-select

Usage

Dioxus · rust
The code is part of Oxyn Pro

The preview is free. Pro opens the code of every Pro component, screen and template.

Get Pro

Examples

Short

Four options, one disabled: type-ahead and a gliding highlight.

Code Pro
The code is part of Oxyn Pro

The preview is free. Pro opens the code of every Pro component, screen and template.

Get Pro

Long

Twelve time zones: a search field takes the trigger's place.

Code Pro
The code is part of Oxyn Pro

The preview is free. Pro opens the code of every Pro component, screen and template.

Get Pro

End

Grows from the end edge.

Code Pro
The code is part of Oxyn Pro

The preview is free. Pro opens the code of every Pro component, screen and template.

Get Pro

API reference

UnfoldSelect

PropTypeDefaultDescription
labelrequiredString—Label.
hide_labelboolDefault::default()Keep the label for assistive technology only.
optionsrequiredVec<Choice>—Options.
valueOption<String>Default::default()Selected value.
placeholderString"Select"Trigger text with no selection.
searchableString"auto"`auto` (above eight options) · `on` · `off`.
panel_widthf64272.0Width of the open surface (never narrower than the trigger).
max_list_heightf64296.0Tallest the list gets before it scrolls.
alignString"start"`start` · `end`: which edge of the trigger stays put.
nameOption<String>Default::default()Hidden input name for forms.
disabledboolDefault::default()Disabled.
nowrequiredClockMs—Shared clock (type-ahead).
on_changeEventHandler<String>—Picked value.

Read from the Rust signature and doc comments.

Keyboard interactions

KeyAction
EnterorSpaceor↓or↑Open on the selected option; pick when open
Page UporDownEight options
HomeorEndEnds (open on them when closed)
Alt↑Pick and close
LettersType-ahead (picks while closed)
EscapeClose back to the trigger
TabClose without picking

Accessibility

  • The trigger has aria-haspopup=listbox; options are role=option with aria-selected; the list follows aria-activedescendant.
  • Reduced motion jumps the size and uses short fades.
From the spec
  • Trigger: aria-haspopup=listbox, aria-expanded; list: role=listbox with aria-activedescendant; options: role=option, aria-selected, aria-disabled.
  • A hidden input submits the value when name is set.

Motion & interaction

Timing
  • Grow: 340 ms clip-path morph (cubic-bezier .3,1.25,.5,1); highlight glide 160 ms; value roll 240 ms.
  • Reduced motion jumps the size and uses a 120 ms fade; no roll.

Responsive behaviour

  • The surface is never narrower than the trigger.
Edge cases (spec)
  • panel_width (272) and max_list_height (296, then it scrolls).

Notes for AI

  • Import UnfoldSelect from oxyn_dioxus and include STATUS_INDICATOR_CSS plus the token stylesheet once.
  • A GPUI version exists: UnfoldSelectEl in oxyn_gpui.
  • Props to set first: label, options, now.
  • It reads a clock (now) for live timers; pass one clock for the whole page rather than one per component.
  • Keep its states and timings as they ship; restyle it through the CSS variables rather than by hand.

Guides

Oxyn · 74 free components · 264 Pro components · 96 screens · 20 blocks · Dioxus and GPUI