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

CheckboxGroup <pm-checkbox-group>

Checkbox group: choose any number of options under one label.

Full screen
Mentions Replies to my posts Billing and invoices Solo Team

Props

<script type="module"> import '@prismora/css'; import '@prismora/elements/checkbox-group'; import '@prismora/elements/radio-group'; </script> <pm-checkbox-group label="Notify me about" name="topics" value="mentions,billing" hint="Choose any that apply."> <pm-choice value="mentions">Mentions</pm-choice> <pm-choice value="replies">Replies to my posts</pm-choice> <pm-choice value="billing">Billing and invoices</pm-choice> </pm-checkbox-group> <pm-radio-group label="Plan" name="plan" value="team" variant="card"> <pm-radio value="solo" description="1 seat, 3 projects">Solo</pm-radio> <pm-radio value="team" description="10 seats, unlimited projects">Team</pm-radio> </pm-radio-group>

Variants

Set with the variant attribute.

Mentions Replies to my posts Billing and invoices
variant="list"
Mentions Replies to my posts Billing and invoices
variant="card"

Sizes

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

Mentions Replies to my posts Billing and invoices
size="xs"
Mentions Replies to my posts Billing and invoices
size="sm"
Mentions Replies to my posts Billing and invoices
size="md"
Mentions Replies to my posts Billing and invoices
size="lg"
Mentions Replies to my posts Billing and invoices
size="xl"

Tones

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

Mentions Replies to my posts Billing and invoices
tone="accent"
Mentions Replies to my posts Billing and invoices
tone="secondary"
Mentions Replies to my posts Billing and invoices
tone="neutral"
Mentions Replies to my posts Billing and invoices
tone="success"
Mentions Replies to my posts Billing and invoices
tone="warning"
Mentions Replies to my posts Billing and invoices
tone="danger"
Mentions Replies to my posts Billing and invoices
tone="info"

States

Each state is one attribute.

Mentions Replies to my posts Billing and invoices
Disabled
Mentions Replies to my posts Billing and invoices
Read-only
Mentions Replies to my posts Billing and invoices
Required
Mentions Replies to my posts Billing and invoices
Error

Overview

Declare options as <pm-choice value="x"> children. value is the chosen values joined with commas; the form receives one entry per chosen value under name. required needs at least one choice; min / max limit how many. variant="card" shows options as cards with an optional description.

Attributes

AttributeTypeDefaultDescription
orientation'vertical' | 'horizontal'verticalLayout and arrow-key direction: horizontal or vertical.
variant'list' | 'card'—list (default) or card.
minnumber—Fewest options that must be chosen.
maxnumber—Most options that can be chosen; the rest are disabled once reached.
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-changeonPmChangeThe selection changed. detail.values lists the chosen values; detail.value joins them with commas.

Methods

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

<pm-choice>

Option declaration for pm-checkbox-group (renders nothing itself).

Attributes

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

Slots

SlotDescription
(default)Option label (text).

Used in templates

NotificationsOnboarding wizardFeedback survey