npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@cas-smartdesign/radio-button-group

v6.0.8

Published

Radio button and radio button group elements with SmartDesign look & feel

Readme

@cas-smartdesign/radio-button-group

A radio-button-group and a radio-button element based on lit-element with SmartDesign 3.0 look & feel.

This element must be used together with the design tokens of SmartDesign. For an independent application, make sure to include the @cas-smartdesign/design-tokens package. For a web app / web widget, refer to the official documentation about design token usage.

radio-button-group

The group accepts any element as a button, not just sd-radio-button. The checked state is reflected on the slotted elements as follows:

  • sd-radio-button children are toggled via their checked attribute.
  • Any other element (e.g. sd-button variant="selection" for a segmented control) is toggled via the standard aria-pressed attribute ("true"/"false").

Attributes

  • layout
    • Defines the layout in which the buttons are placed
    • Possible values: "horizontal", "vertical"
  • uncheck-allowed
    • Defines whether if buttons can be deselected explicitly
  • disabled
    • Defines whether if the group is disabled

Properties

  • layout, uncheckAllowed, disabled
    • Reflects the corresponding attribute
  • value
    • Reflects the value of the checked button in the group

Custom events

  • sd-radio-button-group-value-change: CustomEvent<IValueChangeEvent>
    • This event is dispatched when the value is changed because of a user interaction
    • A button checked in the markup, or added to the group checked, sets value without this event

Validation

The element could show validation messages via an sd-field-validation-message element which can be configured with the following attributes & properties which are all delegated to that:

  • validationMessage
  • validationIconSrc
  • validationLevel

CSS Custom Properties

  • --sd-radio-button-group-gap
    • Defines the gap between the radio buttons in the group.

Focus ring

The group does not draw focus rings itself — they are drawn by @cas-smartdesign/focus-ring (an optional peer dependency). Install it once per application, not per component:

import { FocusRing } from "@cas-smartdesign/focus-ring";

FocusRing.install();

The real focus stays on the group host; the group publishes the visually focused button via aria-activedescendant, so the ring wraps the focused button (radio button or segmented sd-button) instead of the whole group. The ring's shape follows each button's own border-radius — for a segmented control this includes the per-corner radii of the first/last button. Keyboard navigation (Tab, arrow keys) shows the ring; clicking a button does not.

radio-button

Attributes

  • checked
    • Defines whether if the button is checked
  • value
    • Defines the value of the button
  • focused
    • Set by the group on the button it shows as focused
  • disabled
    • Defines whether if the interaction with the button is disabled
  • label
    • Defines the text of the label
  • oneline: boolean
    • The label of the button may wrap into multiple lines without this option.

Properties

  • checked, value, disabled, label
    • Reflects the corresponding attribute
  • focused and oneline are attributes only

CSS Custom Properties

  • --sd-radio-button-checked-color
    • Defines the color of the inner & outer circle when the button is checked
  • --sd-radio-button-unchecked-color
    • Defines the color of the outer circle and the inner circle when the button is unchecked
  • --sd-radio-button-padding
    • Defines the padding of the radio button. It is a shorthand property, so you can set all four paddings at once. (e.g. 10px 5px)