XiodUI
HomeDocs
OverviewComponentsStyling & CustomizationChangelog

Components

  • Accordion
  • Agent Steps
  • Alert
  • Alert Dialog
  • Aspect Ratio
  • Autocomplete
  • Avatar
  • Badge
  • Breadcrumb
  • Button
  • Button Group
  • Button Split
  • Calendar
  • Card
  • Carousel
  • Checkbox
  • Circular Progress
  • Collapsible
  • Color Picker
  • Combobox
  • Command
  • Context Menu
  • Copy To Clipboard
  • Corner Badge
  • Dashboard Grid
  • Date Picker
  • Dialog
  • Dot Matrix
  • Draggable
    Updated
  • Drawer
  • Empty
  • Field
  • Fieldset
  • File Upload
    Updated
  • Form
  • Frame
  • Gauge
  • Grid
  • Group
  • Input
  • Input Group
  • Input OTP
  • Input Payment
  • Input Phone
    Updated
  • Input Sensitive
  • Kbd
  • Kinetic Click
  • Label
  • List Box
    Updated
  • Loader
  • Marker
  • Menu
  • Menubar
  • Message
  • Meter
  • Morphic Toast
  • Navigation Menu
  • Number Field
  • Option Picker
  • Orb
  • Pagination
  • Popover
  • Preview Card
    Updated
  • Progress
  • Radio
  • Resizable
  • Ruler Picker
  • Scroll Area
  • Scroll Bar
  • Select
  • Separator
  • Sidebar
  • Skeleton
  • Slider
  • Sortable
  • Switch
  • Table
  • Tabs
  • Text
  • Textarea
  • Timeline
  • Toast
  • Toggle
  • Toggle Group
  • Toolbar
  • Tooltip
  • Waveform
  • Wheel Picker

Loading...

Preview Skeleton

Installation Skeleton

Usage Skeleton

API Reference Skeleton

Sponsors

Support the development of XiodUI and help us build the best component library on Earth.

+++
Sponsor on GitHub

Option Picker

Previous: Number FieldNext: Orb

A compact dropdown for choosing one option from a short list.

Preview

Loading Preview...

Installation

bun add xiod-ui

Usage

Imports

1import { OptionPicker } from "xiod-ui/option-picker";

API Reference

Detailed documentation of properties and options.

OptionPicker

Accepts every native attribute of the element it renders.

PropTypeDefaultDescription
optionsReq
Option[]
–

The options to choose from. They sit in one row; a row wider than the screen scrolls.

align
"center"|"start"|"end"
Number FieldOrb
center

How the options line up with the button along that side.

defaultOpen
boolean
false

Whether the options start open, when open isn't controlled.

defaultValue
string|null
–

The id of the option selected at first, when it isn't controlled. Defaults to the first option.

disabled
boolean
false

Whether the picker ignores input.

icon
ReactNode
–

Replaces this icon. Accepts any node; null renders no icon. Takes precedence over IconProvider.

name
string
–

The form field name. The selected option's id is submitted under it.

onChange
((value: string) => void)
–

Called with the option's id when the user picks one.

onOpenChange
((open: boolean) => void)
–

Called when the options open or close.

open
boolean
–

Whether the options are open. Use with onOpenChange to control it.

placeholder
ReactNode
–

Shown on the button when no option is selected, or the value matches none of them.

popupClassName
string
–

Classes for the popup that lists the options.

side
"top"|"bottom"|"left"|"right"|"inline-end"|"inline-start"
top

The side of the button the options open on.

sideOffset
number
6

The gap between the button and the options, in pixels.

triggerClassName
string
–

Classes for the button that shows the selected option.

value
string|null
–

The id of the selected option, or null for none. Use with onChange to control it.