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-selectThe preview stays free for everyone. Pro opens the code of every Pro component, screen, agent-app template, block and kit, plus the Pro CLI.
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.
oxyn add unfold-selectUsage
The preview is free. Pro opens the code of every Pro component, screen and template.
Examples
Short
Four options, one disabled: type-ahead and a gliding highlight.
Code Pro
The preview is free. Pro opens the code of every Pro component, screen and template.
Long
Twelve time zones: a search field takes the trigger's place.
Code Pro
The preview is free. Pro opens the code of every Pro component, screen and template.
End
Grows from the end edge.
Code Pro
The preview is free. Pro opens the code of every Pro component, screen and template.
API reference
UnfoldSelect
| Prop | Type | Default | Description |
|---|---|---|---|
labelrequired | String | — | Label. |
hide_label | bool | Default::default() | Keep the label for assistive technology only. |
optionsrequired | Vec<Choice> | — | Options. |
value | Option<String> | Default::default() | Selected value. |
placeholder | String | "Select" | Trigger text with no selection. |
searchable | String | "auto" | `auto` (above eight options) · `on` · `off`. |
panel_width | f64 | 272.0 | Width of the open surface (never narrower than the trigger). |
max_list_height | f64 | 296.0 | Tallest the list gets before it scrolls. |
align | String | "start" | `start` · `end`: which edge of the trigger stays put. |
name | Option<String> | Default::default() | Hidden input name for forms. |
disabled | bool | Default::default() | Disabled. |
nowrequired | ClockMs | — | Shared clock (type-ahead). |
on_change | EventHandler<String> | — | Picked value. |
Read from the Rust signature and doc comments.
Keyboard interactions
| Key | Action |
|---|---|
| EnterorSpaceor↓or↑ | Open on the selected option; pick when open |
| Page UporDown | Eight options |
| HomeorEnd | Ends (open on them when closed) |
| Alt↑ | Pick and close |
| Letters | Type-ahead (picks while closed) |
| Escape | Close back to the trigger |
| Tab | Close 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
nameis 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) andmax_list_height(296, then it scrolls).
Notes for AI
- Import
UnfoldSelectfromoxyn_dioxusand includeSTATUS_INDICATOR_CSSplus the token stylesheet once. - A GPUI version exists:
UnfoldSelectElinoxyn_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.