Fine-tune light, shadows, borders, neumorphic
Light and shadows
Borders
Neumorphic
Forms Form-associated

RadioGroup <pm-radio-group>

Radio group: choose one option from a short list.

Full screen
Free Pro Team

Props

<script type="module"> import '@prismora/css'; import '@prismora/elements/radio-group'; </script> <pm-radio-group label="Plan" name="plan" value="pro"> <pm-radio value="free">Free</pm-radio> <pm-radio value="pro">Pro</pm-radio> <pm-radio value="team">Team</pm-radio> </pm-radio-group>

Variants

Set with the variant attribute.

Free Pro Team
variant="list"
Free Pro Team
variant="card"

Sizes

Set with the size attribute; controls keep touch-sized targets on phones.

Free Pro Team
size="xs"
Free Pro Team
size="sm"
Free Pro Team
size="md"
Free Pro Team
size="lg"
Free Pro Team
size="xl"

Tones

Set tone on the element, or data-tone on any ancestor to tone a whole area.

Free Pro Team
tone="accent"
Free Pro Team
tone="secondary"
Free Pro Team
tone="neutral"
Free Pro Team
tone="success"
Free Pro Team
tone="warning"
Free Pro Team
tone="danger"
Free Pro Team
tone="info"

States

Each state is one attribute.

Free Pro Team
Disabled
Free Pro Team
Read-only
Free Pro Team
Required
Free Pro Team
Error
Free Pro Team
With a hint

Overview

Declare choices as <pm-radio value="x">Label</pm-radio> children; the group renders native radios in one shadow root so arrow-key navigation and name grouping work natively. variant="card" shows each choice as a selectable card; add description to a <pm-radio> for a second line.

Attributes

AttributeTypeDefaultDescription
orientation'vertical' | 'horizontal'verticalLayout and arrow-key direction: horizontal or vertical.
variant'list' | 'card'—list (default) or card.
namestring—Form field name: the value is submitted under it.
valuestring—Current value (submitted with the form).
labelstring—Visible label (required for accessibility; use hide-label to visually hide it).
hintstring—Help text under the field, linked to it for screen readers.
errorstring—Custom error message. Setting it marks the control invalid.
size'xs' | 'sm' | 'md' | 'lg' | 'xl'—Control size.
requiredbooleanfalseThe form cannot be submitted until this has a value.
disabledbooleanfalseNot interactive and not submitted.
readonlybooleanfalseFocusable and submitted, but not editable.
hide-label
prop: hideLabel
booleanfalseHide the label visually; it stays the accessible name.

Also accepts the contextual attributes tone, surface, radius, density, motion, elevation. They are inherited from ancestors' data-* attributes.

Events

EventReact / Svelte propDescription
pm-changeonPmChangeWhen the value is committed.

Methods

checkValidity(), reportValidity(), validate(), focus()

<pm-radio>

Choice declaration for pm-radio-group (renders nothing itself).

Attributes

AttributeTypeDefaultDescription
valuestring—Value submitted when chosen.
descriptionstring—Second line under the label (card variant).
disabledboolean—Disable this choice.

Slots

SlotDescription
(default)Choice label (text).

Used in templates

Team and rolesBilling and invoicesShopping cartCheckoutOnboarding wizardAppointment bookingFeedback survey