Bedform UIControls
Select
Select an option from a native menu.
Select
*
boolean
*
string
*
boolean
Usage
import { Select } from "@bedform/ui/select";
import { useState } from "react";
export function GameModeSelect() {
const [value, setValue] = useState("creative");
return (
<>
<label htmlFor="game-mode">Game mode</label>
<Select
id="game-mode"
name="game-mode"
value={value}
onChange={(event) => setValue(event.currentTarget.value)}
>
<option value="survival">Survival</option>
<option value="creative">Creative</option>
<option value="adventure">Adventure</option>
<option value="spectator" disabled>
Spectator
</option>
</Select>
</>
);
}Native behavior
The closed control uses the same OreUI surface and icon as the Dropdown trigger. The opened option panel is rendered by the browser and operating system, so its exact appearance is platform-dependent.
Use Select for plain text options. Use Dropdown only when options require custom content or a fully styled popup.
Forms and events
Select renders a native select, accepts every select attribute, and forwards its ref to it. disabled, required, name, value, validation, FormData, keyboard navigation, and form reset remain browser behavior. Use onChange or onInput as on any select.
CSS variables
| Variable | Purpose |
|---|---|
--ore-select-unit | Base size unit |
--ore-select-background-default | Default surface |
--ore-select-background-hover | Hover surface |
--ore-select-background-pressed | Pressed surface |
--ore-select-highlight-default | Default highlight |
--ore-select-border | Outer border |
--ore-select-shadow | Bottom shadow |
--ore-select-foreground | Selected text and chevron icon |