Skip to Content

Select

A brandless select element. Uses appearance: none — the browser’s native select rendering is fully removed. Color fallbacks use CSS system color keywords so the unstyled component remains visible in both light and dark mode.

Usage

import { Select } from '@froglet/ui' <Select> <option value="one">Option One</option> <option value="two">Option Two</option> </Select> // Themed <Select className="select--brand"> <option value="one">Option One</option> </Select>

Props

PropTypeDescription
childrenReactNode<option> elements.
classNamestringAdditional CSS classes. Use to apply a token block.
refReact.Ref<HTMLSelectElement>Forwarded to the underlying <select>.
...propsSelectHTMLAttributes<HTMLSelectElement>All standard select attributes.

CSS Custom Properties

TokenDefaultDescription
--select-border-width1pxBorder width.
--select-border-stylesolidBorder style.
--select-border-colorcurrentColorBorder color.
--select-border-radius0Border radius.
--select-padding0.5rem 0.75remInternal padding.
--select-font-size1remFont size.
--select-text-colorCanvasTextText color.
--select-background-colorCanvasBackground color.
--select-border-color-hovercurrentColorBorder color on hover.
--select-background-color-hoverCanvasBackground on hover.
--select-border-color-focuscurrentColorBorder color when focused.
--select-outline-width-focus2pxFocus ring width.
--select-outline-color-focuscurrentColorFocus ring color.
--select-outline-offset-focus2pxFocus ring offset.
--select-text-color-disabledGrayTextText color when disabled.
--select-background-color-disabledCanvasBackground when disabled.
--select-border-color-disabledGrayTextBorder color when disabled.

Accessibility

  • Renders as a semantic <select> with full keyboard and screen reader support.
  • Always associate a visible label using a <label> element or aria-label.
Last updated on