Kinetic Radio Group

A radio group as a list of rows, with a dot that pops on the chosen one.

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

Kinetic Radio Group

The code

Copy the Kinetic Radio Group

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-radio label="Delivery Speed" items="Standard,Express,Overnight" value="1" sfx="チッ!"></kt-kinetic-radio>

<kt-kinetic-radio label="Workspace Mode" items="Focus,Collaborate,Auto" value="0" sfx="カチッ!"></kt-kinetic-radio>

Attributes

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

Keyboard and screen readers

  • role="radiogroup" with role="radio" and aria-checked.
  • Arrow keys move the choice; Space selects.

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 Radio Group: questions answered

How do I use the Kinetic Radio Group?

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-radio>.

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

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

Is the Kinetic Radio Group accessible?

role="radiogroup" with role="radio" and aria-checked. Arrow keys move the choice; Space selects.

Can I change the Kinetic Radio Group 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.