Skip to main content

Starwind UI v3.7 is here with stable Vue and Svelte, the new Chart component, and full RTL support. Read the release notes

Select Primitive

Use Select to pick one option from a popup list. It handles opening the list, moving between options with the keyboard, and submitting the chosen value when the control has a name.

Framework

Anatomy

Open the Framework list and choose React. The list closes and the trigger shows React.

---
import { Select } from "@starwind-ui/astro/select";
---
<Select.Root defaultValue="astro" name="framework">
<Select.Label>Framework</Select.Label>
<Select.Trigger type="button">
<Select.Value>Astro</Select.Value>
</Select.Trigger>
<Select.Positioner>
<Select.Popup>
<Select.List>
<Select.Item value="astro">
<Select.ItemText>Astro</Select.ItemText>
</Select.Item>
<Select.Item value="react">
<Select.ItemText>React</Select.ItemText>
</Select.Item>
</Select.List>
</Select.Popup>
</Select.Positioner>
</Select.Root>

Astro, React, Vue, and Svelte components use the same underlying interactions. Each framework has its own way to read and update state. See the examples and your installed packageโ€™s types for the available props and events. Plain HTML uses DOM events and Runtime methods.

Usage Guidelines

  • Give the root a position for form validation. A required Select blocks form submission while it has no value. The browser shows its message next to the trigger and moves focus to the trigger. Give the Select root a position, such as position: relative, so the message appears at the trigger inside scroll containers. The styled Select already does this.

Positioning

Select positions its popup from the trigger. Keep the Positioner and Popup parts near the trigger in source order so the relationship stays readable, then let the Runtime handle placement, collision, and open-state updates after hydration.

Examples

Positioned Select

Compose the positioning parts around the Select popup.

---
import { Select } from "@starwind-ui/astro/select";
---
<Select.Root defaultValue="astro">
<Select.Label>Framework</Select.Label>
<Select.Trigger>
<Select.Value>Astro</Select.Value>
<Select.Icon>v</Select.Icon>
</Select.Trigger>
<Select.Positioner>
<Select.Popup>
<Select.List>
<Select.Item value="astro">
<Select.ItemText>Astro</Select.ItemText>
<Select.ItemIndicator />
</Select.Item>
<Select.Item value="react">
<Select.ItemText>React</Select.ItemText>
<Select.ItemIndicator />
</Select.Item>
</Select.List>
</Select.Popup>
</Select.Positioner>
</Select.Root>

Floating Behavior

FactValue
Anchor parttrigger
Positioner partpositioner
Popup partpopup
Portal partportal
Option propsside, align, sideOffset, alignOffset, avoidCollisions, alignItemWithTrigger

API Reference

Root

The main element that owns the Select Runtime instance.

Default element
div
Discovery hook
data-sw-select
Role
-

Props

Prop Type Default Toggle
open boolean -
Description
Controls whether Select is open.
Kind
control
Targets
-
Full type
boolean
React

Use open for controlled state and defaultOpen for default state, and onOpenChange for change proposals.

  • open
  • defaultOpen
  • onOpenChange
Astro

Use open or defaultOpen for initial state, listen for starwind:open-change, and call setOpen for later updates.

  • open
  • defaultOpen
  • starwind:open-change
  • setOpen
Runtime / HTML

Use data-default-open for initial state, listen for starwind:open-change, and call setOpen for later updates.

  • data-default-open
  • starwind:open-change
  • setOpen
defaultOpen boolean -
Description
Sets whether Select starts open.
Kind
control
Targets
-
Full type
boolean
React

Use open for controlled state and defaultOpen for default state, and onOpenChange for change proposals.

  • open
  • defaultOpen
  • onOpenChange
Astro

Use open or defaultOpen for initial state, listen for starwind:open-change, and call setOpen for later updates.

  • open
  • defaultOpen
  • starwind:open-change
  • setOpen
Runtime / HTML

Use data-default-open for initial state, listen for starwind:open-change, and call setOpen for later updates.

  • data-default-open
  • starwind:open-change
  • setOpen
value string | null -
Description
Controls the current Select value.
Kind
control
Targets
-
Full type
string | null
React

Use value for controlled state and defaultValue for default state, and onValueChange for change proposals.

  • value
  • defaultValue
  • onValueChange
Astro

Use value or defaultValue for initial state, listen for starwind:value-change, and call setValue for later updates.

  • value
  • defaultValue
  • starwind:value-change
  • setValue
Runtime / HTML

Use data-default-value for initial state, listen for starwind:value-change, and call setValue for later updates.

  • data-default-value
  • starwind:value-change
  • setValue
defaultValue string | null -
Description
Sets the initial Select value for uncontrolled usage.
Kind
control
Targets
-
Full type
string | null
React

Use value for controlled state and defaultValue for default state, and onValueChange for change proposals.

  • value
  • defaultValue
  • onValueChange
Astro

Use value or defaultValue for initial state, listen for starwind:value-change, and call setValue for later updates.

  • value
  • defaultValue
  • starwind:value-change
  • setValue
Runtime / HTML

Use data-default-value for initial state, listen for starwind:value-change, and call setValue for later updates.

  • data-default-value
  • starwind:value-change
  • setValue
autoComplete string -
Description
Sets the native autocomplete behavior.
Kind
option
Targets
-
Full type
string
disabled boolean -
Description
Disables the Root part.
Kind
option
Targets
-
Full type
boolean
form string -
Description
Associates the control with a form element.
Kind
option
Targets
-
Full type
string
highlightItemOnHover boolean true
Description
Highlights Select items when the pointer moves over them.
Kind
option
Targets
-
Full type
boolean
modal boolean true
Description
Makes Select behave as a modal overlay.
Kind
option
Targets
root
Full type
boolean
name string -
Description
Sets the submitted form field name.
Kind
option
Targets
-
Full type
string
readOnly boolean false
Description
Marks the control as read-only.
Kind
option
Targets
-
Full type
boolean
required boolean -
Description
Marks the form control as required.
Kind
option
Targets
-
Full type
boolean
onOpenChange (open: boolean, details: SelectOpenChangeDetails) => void -
Description
Runs when Select opens or closes.
Kind
callback
Targets
-
Full type
(open: boolean, details: SelectOpenChangeDetails) => void
React

Use open for controlled state and defaultOpen for default state, and onOpenChange for change proposals.

  • open
  • defaultOpen
  • onOpenChange
Astro

Use open or defaultOpen for initial state, listen for starwind:open-change, and call setOpen for later updates.

  • open
  • defaultOpen
  • starwind:open-change
  • setOpen
Runtime / HTML

Use data-default-open for initial state, listen for starwind:open-change, and call setOpen for later updates.

  • data-default-open
  • starwind:open-change
  • setOpen
onValueChange (value: string | null, details: SelectValueChangeDetails) => void -
Description
Runs when the Select value changes.
Kind
callback
Targets
-
Full type
(value: string | null, details: SelectValueChangeDetails) => void
React

Use value for controlled state and defaultValue for default state, and onValueChange for change proposals.

  • value
  • defaultValue
  • onValueChange
Astro

Use value or defaultValue for initial state, listen for starwind:value-change, and call setValue for later updates.

  • value
  • defaultValue
  • starwind:value-change
  • setValue
Runtime / HTML

Use data-default-value for initial state, listen for starwind:value-change, and call setValue for later updates.

  • data-default-value
  • starwind:value-change
  • setValue

Events

Event Callback Value Toggle
openChange onOpenChange open: boolean
Description
Fires when Select opens or closes.
DOM event
starwind:open-change
Details type
SelectOpenChangeDetails
Timing
before-state-commit
Cancelable
Yes
Cancellation sequence
  1. Check internal eligibility and intent.
  2. Create one details object for the proposal.
  3. Call the Runtime callback with the details object when the controller exposes one.
  4. Dispatch the cancelable DOM event with the same details object, including when the callback canceled it.
  5. Read details.isCanceled, including cancellation caused by preventDefault().
  6. Apply the accepted state.
  7. Notify Runtime subscribers and other accepted-only observers.
valueChange onValueChange value: string | null
Description
Fires when the value changes for Select.
DOM event
starwind:value-change
Details type
SelectValueChangeDetails
Timing
before-state-commit
Cancelable
Yes
Cancellation sequence
  1. Check internal eligibility and intent.
  2. Create one details object for the proposal.
  3. Call the Runtime callback with the details object when the controller exposes one.
  4. Dispatch the cancelable DOM event with the same details object, including when the callback canceled it.
  5. Read details.isCanceled, including cancellation caused by preventDefault().
  6. Apply the accepted state.
  7. Notify Runtime subscribers and other accepted-only observers.

State

State Type Props Toggle
open boolean open / defaultOpen
Description
Tracks whether Select is open.
Initial attribute
data-default-open
Runtime getter
getOpen
Runtime setter
setOpen
React

Use open for controlled state and defaultOpen for default state, and onOpenChange for change proposals.

  • open
  • defaultOpen
  • onOpenChange
Astro

Use open or defaultOpen for initial state, listen for starwind:open-change, and call setOpen for later updates.

  • open
  • defaultOpen
  • starwind:open-change
  • setOpen
Runtime / HTML

Use data-default-open for initial state, listen for starwind:open-change, and call setOpen for later updates.

  • data-default-open
  • starwind:open-change
  • setOpen
value string | null value / defaultValue
Description
Tracks the current Select value.
Initial attribute
data-default-value
Runtime getter
getValue
Runtime setter
setValue
React

Use value for controlled state and defaultValue for default state, and onValueChange for change proposals.

  • value
  • defaultValue
  • onValueChange
Astro

Use value or defaultValue for initial state, listen for starwind:value-change, and call setValue for later updates.

  • value
  • defaultValue
  • starwind:value-change
  • setValue
Runtime / HTML

Use data-default-value for initial state, listen for starwind:value-change, and call setValue for later updates.

  • data-default-value
  • starwind:value-change
  • setValue

Data Attributes

Runtime hooks
Attribute Value Description
data-sw-select - Marks the Root part so Starwind Runtime can find it.
State
Attribute Value Description
data-state - Reflects the current state on the Root part.
Metadata
Attribute Value Description
data-autocomplete - Reflects the autocomplete prop on the Root part.
data-default-open - Reflects the default open prop on the Root part.
data-default-value - Reflects the default value prop on the Root part.
data-disabled - Reflects the disabled prop on the Root part.
data-form - Reflects the form prop on the Root part.
data-highlight-item-on-hover - Reflects the highlight item on hover prop on the Root part.
data-modal - Reflects the modal prop on the Root part.
data-name - Reflects the name prop on the Root part.
data-readonly - Reflects the readonly prop on the Root part.
data-required - Reflects the required prop on the Root part.

Label

Text label associated with Select.

Default element
div
Discovery hook
data-sw-select-label
Role
-

Data Attributes

Runtime hooks
Attribute Value Description
data-sw-select-label - Marks the Label part so Starwind Runtime can find it.

Trigger

The control that opens, closes, or targets the Select content.

Default element
button
Discovery hook
data-sw-select-trigger
Role
combobox

Props

Prop Type Default Toggle
asChild boolean -
Description
Merges behavior onto your child element instead of rendering the default Trigger element.
Kind
rendering
Targets
trigger
Full type
boolean

Data Attributes

Runtime hooks
Attribute Value Description
data-sw-select-trigger - Marks the Trigger part so Starwind Runtime can find it.
State
Attribute Value Description
data-state - Reflects the current state on the Trigger part.
Metadata
Attribute Value Description
data-readonly - Reflects the readonly prop on the Trigger part.

Value

Displays the current Select value.

Default element
span
Discovery hook
data-sw-select-value
Role
-

Data Attributes

Runtime hooks
Attribute Value Description
data-sw-select-value - Marks the Value part so Starwind Runtime can find it.

Icon

Decorative icon rendered by Select.

Default element
span
Discovery hook
data-sw-select-icon
Role
-

Data Attributes

Runtime hooks
Attribute Value Description
data-sw-select-icon - Marks the Icon part so Starwind Runtime can find it.

Input

The native input synchronized by Select.

Default element
input
Discovery hook
data-sw-select-input
Role
-

Data Attributes

Runtime hooks
Attribute Value Description
data-sw-select-input - Marks the Input part so Starwind Runtime can find it.

Portal

Moves Select overlay content to the document body when needed.

Default element
div
Discovery hook
data-sw-select-portal
Role
-

Data Attributes

Runtime hooks
Attribute Value Description
data-sw-select-portal - Marks the Portal part so Starwind Runtime can find it.
data-placement - Marks the Portal part so Starwind Runtime can find it.
Metadata
Attribute Value Description
data-container - Reflects the container prop on the Portal part.
data-disabled - Reflects the disabled prop on the Portal part.
data-sw-portal-placement runtime Identifies Portal metadata for styling and selectors.

Positioner

Positions the Select content relative to its trigger.

Default element
div
Discovery hook
data-sw-select-positioner
Role
-

Props

Prop Type Default Toggle
side "top" | "right" | "bottom" | "left" "bottom"
Description
Sets the preferred side for Select content.
Kind
option
Targets
positioner, popup
Full type
"top" | "right" | "bottom" | "left"
align "start" | "center" | "end" "start"
Description
Sets how Select content aligns to its trigger.
Kind
option
Targets
positioner, popup
Full type
"start" | "center" | "end"
sideOffset number 4
Description
Sets the distance between Select content and its trigger.
Kind
option
Targets
positioner, popup
Full type
number
alignOffset number 0
Description
Adjusts the cross-axis alignment offset for Select content.
Kind
option
Targets
positioner, popup
Full type
number
avoidCollisions boolean true
Description
Allows Select content to shift or flip to stay visible.
Kind
option
Targets
positioner, popup
Full type
boolean
alignItemWithTrigger boolean true
Description
Configures the align item with trigger option for the Positioner part.
Kind
option
Targets
positioner
Full type
boolean

Data Attributes

Runtime hooks
Attribute Value Description
data-sw-select-positioner - Marks the Positioner part so Starwind Runtime can find it.
Metadata
Attribute Value Description
data-side - Reflects the side prop on the Positioner part.
data-align - Reflects the align prop on the Positioner part.
data-side-offset - Reflects the side offset prop on the Positioner part.
data-align-offset - Reflects the align offset prop on the Positioner part.
data-align-item-with-trigger - Reflects the align item with trigger prop on the Positioner part.
data-avoid-collisions - Reflects the avoid collisions prop on the Positioner part.

The floating content container for Select.

Default element
div
Discovery hook
data-sw-select-popup
Role
listbox

Props

Prop Type Default Toggle
side "top" | "right" | "bottom" | "left" "bottom"
Description
Sets the preferred side for Select content.
Kind
option
Targets
positioner, popup
Full type
"top" | "right" | "bottom" | "left"
align "start" | "center" | "end" "start"
Description
Sets how Select content aligns to its trigger.
Kind
option
Targets
positioner, popup
Full type
"start" | "center" | "end"
sideOffset number 4
Description
Sets the distance between Select content and its trigger.
Kind
option
Targets
positioner, popup
Full type
number
alignOffset number 0
Description
Adjusts the cross-axis alignment offset for Select content.
Kind
option
Targets
positioner, popup
Full type
number
avoidCollisions boolean true
Description
Allows Select content to shift or flip to stay visible.
Kind
option
Targets
positioner, popup
Full type
boolean

Data Attributes

Runtime hooks
Attribute Value Description
data-sw-select-popup - Marks the Popup part so Starwind Runtime can find it.
State
Attribute Value Description
data-state - Reflects the current state on the Popup part.
Metadata
Attribute Value Description
data-side - Reflects the side prop on the Popup part.
data-align - Reflects the align prop on the Popup part.
data-side-offset - Reflects the side offset prop on the Popup part.
data-align-offset - Reflects the align offset prop on the Popup part.
data-avoid-collisions - Reflects the avoid collisions prop on the Popup part.

List

The list of selectable Select items.

Default element
div
Discovery hook
data-sw-select-list
Role
-

Data Attributes

Runtime hooks
Attribute Value Description
data-sw-select-list - Marks the List part so Starwind Runtime can find it.

Group

Groups related Select items.

Default element
div
Discovery hook
data-sw-select-group
Role
group

Data Attributes

Runtime hooks
Attribute Value Description
data-sw-select-group - Marks the Group part so Starwind Runtime can find it.

Group Label

Labels a group of Select items.

Default element
div
Discovery hook
data-sw-select-group-label
Role
-

Data Attributes

Runtime hooks
Attribute Value Description
data-sw-select-group-label - Marks the Group Label part so Starwind Runtime can find it.

Item

An interactive item inside the Select collection.

Default element
div
Discovery hook
data-sw-select-item
Role
option

Data Attributes

Runtime hooks
Attribute Value Description
data-sw-select-item - Marks the Item part so Starwind Runtime can find it.
Metadata
Attribute Value Description
data-value - Reflects the value prop on the Item part.
data-disabled - Reflects the disabled prop on the Item part.

Item Text

Text content for a Select item.

Default element
span
Discovery hook
data-sw-select-item-text
Role
-

Data Attributes

Runtime hooks
Attribute Value Description
data-sw-select-item-text - Marks the Item Text part so Starwind Runtime can find it.

Item Indicator

Shows the selected state for a Select item.

Default element
span
Discovery hook
data-sw-select-item-indicator
Role
-

Data Attributes

Runtime hooks
Attribute Value Description
data-sw-select-item-indicator - Marks the Item Indicator part so Starwind Runtime can find it.
State
Attribute Value Description
data-state - Reflects the current state on the Item Indicator part.
data-hidden - Reflects the hidden state on the Item Indicator part.

Separator

Separates groups of Select items.

Default element
div
Discovery hook
data-sw-select-separator
Role
separator

Data Attributes

Runtime hooks
Attribute Value Description
data-sw-select-separator - Marks the Separator part so Starwind Runtime can find it.

Scroll Up Arrow

Scrolls Select options upward.

Default element
div
Discovery hook
data-sw-select-scroll-up-arrow
Role
-

Data Attributes

Runtime hooks
Attribute Value Description
data-sw-select-scroll-up-arrow - Marks the Scroll Up Arrow part so Starwind Runtime can find it.

Scroll Down Arrow

Scrolls Select options downward.

Default element
div
Discovery hook
data-sw-select-scroll-down-arrow
Role
-

Data Attributes

Runtime hooks
Attribute Value Description
data-sw-select-scroll-down-arrow - Marks the Scroll Down Arrow part so Starwind Runtime can find it.

Runtime API

Factory
createSelect
Import
@starwind-ui/runtime/select
Root hook
root data-sw-select
Option props
autoComplete, defaultOpen, defaultValue, disabled, form, highlightItemOnHover, modal, open, readOnly, value

Option Lifecycles

OptionLifecycle
autoCompleteconstructor-only
defaultOpenconstructor-only
defaultValueconstructor-only
disabledconstructor-only
formconstructor-only
highlightItemOnHoverconstructor-only
modalconstructor-only
opensetter-backed
readOnlyconstructor-only
valuesetter-backed

Runtime Setters

Method Target Description
setOpen state: open Opens or closes Select from Runtime code.
setValue state: value Updates the current Select value from Runtime code.

Form Participation

FactValue
Form propsautoComplete, form, name, required, value
Hidden inputinput (text)
Field integrationYes
Component Relationship
Select Direct primitive

Changelog

View version history v1.4.0 12 releases

v1.4.0

  • Select options align to the reading start edge. Its popup keeps the direction of the trigger when it moves into a portal.
  • A click during the Select close animation now goes to the page below the list. Before, the closing list caught the click, so a quick click on a control under it did nothing.
  • When you close a Select with focus inside it, focus now goes back to the trigger as the close starts. The closing list takes no keyboard input until it hides.
  • In Vue, the default slot of `Select.Value` no longer receives `label` and `value`. In Svelte, its `children` snippet no longer receives them. If you read them, use `v-model` or `bind:value` on the Select root and find the label from that value. Leave `Select.Value` empty to show the selected label.
  • In Vue, `Select.Trigger` with `asChild` now accepts a child wrapped in one fragment or next to an empty `v-if`.
  • In Vue, `SelectContextValue` no longer has `element`, `mounted`, `requestRefresh()` or `registerPortal()`. In Svelte, it no longer has `mounted`, `registerTrigger()` or `registerPortal()`. The state fields, such as `open` and `value`, stay.
  • Select now closes when you press Tab right after the click that opened it. Before, focus left the list, but it stayed open.
  • In Svelte, the server HTML of an enabled `Select.Trigger` leaves out `aria-disabled` until it mounts, as in the other frameworks.
  • In Svelte, the `data-default-*` attributes of Select now come only from its `default*` props, and `false` flags such as `data-close-on-click` are left out, as in the other frameworks.
  • In Vue, this component now needs Vue 3.5.21 or newer.
  • Internal code cleanup, such as unused code and import order. This cleanup does not change behavior.

v1.3.0

  • In Astro, an attribute that you set on a Select part now wins over the part's own default for the same attribute, such as `role` or `aria-label`.
  • In Svelte, a defined `value` or `open` that you pass when Select mounts now stays under your control, as in React and Vue. To change it, use `bind:` or update your state in the change callback. A form reset keeps it. If you pass `undefined` at mount, Select keeps its own state.
  • In Svelte, Select no longer exports `show`, `close`, or `updatePosition`. Use `bind:open` or `bind:value` instead.
  • `Select.Value` with its own content and no `placeholder` now shows that content until a value is chosen, in Astro and Vue. Before, the trigger was blank. React already did this.
  • In React, Select now shows the selected label when your own component renders the items. If your items load later, a value has no label until someone opens the list and picks an item.
  • In React, a Select now keeps the label of the parent value after the parent refuses a pick.
  • Pressing the trigger of an open Select in Safari now closes the list. Before, the list closed and opened again.
  • In Svelte, `Select.Trigger` still needs a button in `child`. With another element it does nothing, and it now logs a console error in production as well as in development.
  • In Vue, the template ref of the Select root no longer has the undocumented methods `open`, `close`, `updatePosition`, `getValue`, and `setValue`. It exposes only `element`. Use `v-model` on the root instead.
  • In Vue, `Select.Trigger` with `asChild` accepts a component child.
  • In React, Select and Combobox inside a `Field` with a `name` now send their value when the form submits, and they call `onValueChange`, `onOpenChange`, and `onInputValueChange`. Before, the form often left the value out, and the callbacks did not run.
  • A `name` on a control now wins over the `name` on its `Field`, in all frameworks. If you set different names on a `Field` and its control, and your server reads the `Field` name, remove the `name` from the control.

v1.2.1

  • A `required` Select now stops a plain HTML form from submitting when no option is selected. The browser shows its message next to the Select and puts focus on the trigger. Before, the empty form submitted.
  • Give the Select root a CSS position, such as `position: relative`. Then the browser message shows at the trigger inside a scrolling container. The styled Select already does this.
  • A Select without `required` still lets the Enter key submit the form as before.
  • When a required Select is the first field with an error in a Starwind Form, submit and `validate({ focus: true })` now put focus on the trigger, and the page scrolls to it.

v1.2.0

  • Select labels in Vue and Svelte now update when the selected option's text changes or its option loads after the value is set, whether the popup is open or closed.
  • Vue Select keeps its previous selection and open state when a change is canceled.
  • Reduced background work when a React page uses multiple menus, tooltips, or other portals.
  • Added `asChild` to the Vue Select Trigger so you can use your own element as the trigger.
  • React Select keeps its current selection when a reset is canceled and preserves newer values while a reset is pending. Keep it in the same form until that reset finishes.
  • Fixed nested Svelte overlays inside a dialog appearing behind their parent or failing to receive clicks.
  • Reduced background work when a Vue page uses multiple menus, tooltips, or other portals.
  • Fixed nested overlays appearing behind their parent in Vue and Svelte. Overlays can now render under the document body; if custom CSS or DOM queries require them to stay inside a parent, set a portal container or add `data-floating-root` to that parent.
  • Reduced the JavaScript loaded by Select when it is used without Field.
  • Fixed React 18 retaining removed popup elements when the parent component stays mounted.
  • Reduced repeated JavaScript when Astro Select is used with other Starwind components.
  • Reduced JavaScript used by Svelte Select. Element props, event handlers, and refs keep the same behavior.

v1.1.1

  • Removed old comments from the Vue Primitive files that said the code was internal and not for release. The CLI also removes the blank line that these comments left in the Vue Primitive `index.ts` files that it copies into your project.
  • Group headings are now linked to their groups with `aria-labelledby`, so screen readers announce the name of each group.

v1.1.0

  • Added `container` and `disabled` to the Portal part. `container` sets the element that holds the popup, and `disabled` keeps the popup in place. Portals now place nested popups in the same way every time, and they show their placement in data attributes.
  • On mobile browsers, a tap on the Select trigger now closes an open Select list, and a tap on an option now selects it.

v1.0.0

  • This Primitive is now stable at version `1.0.0`. Its API and behavior stay the same as in the previous release.

v0.1.4

  • The React Primitive files that the CLI copies into your project are now marked with `"use client"`, so they stay client components in React server frameworks.
  • In React, you can cancel a change from its change callback or DOM event before it applies. React then shows only the changes that apply.
  • React Select now picks up a value that code sets without a change event. Because of this, the Color Picker format control shows its set format before anyone uses it.
  • In React, the Select trigger inside the Color Picker format control now keeps the selected style.

v0.1.3

  • In React, a Select item with an empty label now keeps that empty label. Its value is still sent with the form while the list is closed.

v0.1.2

  • In React, a closed Select now does less work when it mounts. Its value and form value stay correct.

v0.1.1

  • By default, the page behind the Select no longer scrolls while the list is open. The `modal` option controls this.

v0.1.0

  • First release. Select handles selection and keyboard navigation. It places its list next to the trigger, fires events, and sends its value with the form.