Skip to content

pantoken / formats/components/src / selectCss

Function: selectCss()

selectCss(options?): string

Beta

The experimental customizable-select enhancement for .<prefix>-simple-select. Everything is gated behind @supports (appearance: base-select) (the CSS Customizable Select model — Chrome 135+, NOT yet Baseline), so it's pure progressive enhancement: browsers without support keep the plain simpleSelectCss control; supporting browsers get a styled ::picker(select) panel and styled options (hover/selected) from the --instui-component-options-item-* tokens. Shipped as its own opt-in select.css (like fonts.css) rather than folded into components.css, precisely because the feature is experimental — you opt in deliberately.

Parameters

options?

ComponentOptions = {}

ComponentOptions.

Returns

string

The CSS string.

Example

ts
import { selectCss } from "@pantoken/components";

// Load AFTER components.css; enhances the same <select class="instui-simple-select"> element.
const css = selectCss();