Kinetic Select

A dropdown that opens with a snap and keeps keyboard focus on the options.

  • <kt-kinetic-select>
  • Selection
  • No framework

Kinetic Select

The code

Copy the Kinetic Select

Fastest: press Copy on the card above for one complete file. To build it into your own project, use the files below: the markup, the styles, this component’s script and the shared effects script (effects.js) that every component uses.

<kt-kinetic-select label="Environment" items="Production,Staging,Local" value="1" sfx="パカッ!"></kt-kinetic-select>

<kt-kinetic-select label="Region" items="US East,EU West,Asia Pacific" value="0" sfx="チッ!"></kt-kinetic-select>

Attributes

NameWhat it doesDefault
labelHeading above the field.—
itemsComma-separated option names.—
valueIndex of the chosen option, starting at 0.0
sfxSound-effect text on change.—

Keyboard and screen readers

  • Uses a listbox with aria-expanded on the trigger.
  • Arrow keys, Enter and Escape work as in a native select.

Styling variables

Every look is a CSS variable: --kt-accent, --kt-accent-ink, --kt-radius-btn, --kt-surface-radius, --kt-surface-bg, --kt-border-w, --kt-comp-shadow and --font-sans. The copied file sets them all from your choices.

FAQ

Kinetic Select: questions answered

How do I use the Kinetic Select?

Press Copy on the card to get a complete HTML file, or copy the HTML, CSS and JavaScript tabs into your own page. In your markup the element is written as <kt-kinetic-select>.

Which attributes does <kt-kinetic-select> accept?

label, items, value, sfx. Each one is described in the attributes table on this page.

Is the Kinetic Select accessible?

Uses a listbox with aria-expanded on the trigger. Arrow keys, Enter and Escape work as in a native select.

Can I change the Kinetic Select colors, corners and font?

Yes. Use the options on this page: accent color, border radius, background, border, shadow and Google font. The copied code already contains your choices, and every one of them is a CSS variable you can edit later.