Theme: ← Übersicht Tokens

Radio-Gruppe

Radiobutton-Gruppe mit Optionen-Array — Gruppen-Logik im Element gelöst (ein name, eine Auswahl). 1.7.0 (20.10.2026): Karten mit „Mehr anzeigen“ tragen den offenen Zustand als data-radio-more-open (radio-group.js, kein :has() mehr). 1.6.0 (opt-in): options[].image = Bildkarten (Bild oben, Titel mitt

UI Elements v1.7.1 Formulare WebsiteAppDesktop ui.radio-group

Nutzt: ui.icon

Beispiele

Vertikal mit Auswahl
Versandart
Horizontal
Anrede
Fehlerzustand
Zahlungsziel
Bitte ein Zahlungsziel wählen.
Deaktiviert
Vertragsart (gesperrt)

Eigenschaften

PropTypDefaultBuilder-Label
labelstring""Gruppen-Label
name *string—Feldname
options *array—Optionen
appearancestring: list | cards"list"Darstellung
valuestring""Gewählter Wert
layoutstring: vertical | horizontal"vertical"Anordnung
disabledbooleanfalseDeaktiviert
requiredbooleanfalsePflichtauswahl
invalidbooleanfalseFehlerzustand
hintstring""Hinweis/Fehlertext
paddingstring: standard | none | sm | md | lg | xl"standard"Innenabstand (standard = Baustein-Wert)
marginstring: standard | none | sm | md | lg | xl"standard"Aussenabstand
borderstring: standard | none | hairline | strong"standard"Rahmen
radiusstring: standard | none | control | surface | pill"standard"Ecken-Rundung
textColorstring""Textfarbe (Token; leer = Standard)
backgroundColorstring""Hintergrundfarbe (Token; leer = Standard)
shadowstring: standard | none | sm | md | lg"standard"Schatten
widthstring: standard | full"standard"Breite
alignSelfstring: standard | start | center | end"standard"Ausrichtung im Elternteil
anchorstring""Anker-ID (Sprungziel, z. B. fuer Nav-Links)

* Pflicht-Prop

Events & Slots

Events: ⚡ change — im Surface per on: {<event>: {action, params}} verdrahtbar.

Slot more1: akzeptiert ui.*, component.*, layout.*

Slot more2: akzeptiert ui.*, component.*, layout.*

Slot more3: akzeptiert ui.*, component.*, layout.*

Slot more4: akzeptiert ui.*, component.*, layout.*

Slot more5: akzeptiert ui.*, component.*, layout.*

Slot more6: akzeptiert ui.*, component.*, layout.*

Slot more7: akzeptiert ui.*, component.*, layout.*

Slot more8: akzeptiert ui.*, component.*, layout.*

Stellschrauben (Komponenten-Tokens)

Ebene 3 — aus dem CSS generiert (Registry). Umverdrahtbar per Hüllen-Komposition, ohne Markup-Eingriff; künftige Regler-Quelle des Component Builders.

TokenDefault
--radio-group-action-primaryvar(--color-action-primary)
--radio-group-focus-ring-colorvar(--focus-ring-color)
--radio-group-focus-ring-offsetvar(--focus-ring-offset)
--radio-group-focus-ring-widthvar(--focus-ring-width)
--radio-group-form-errorvar(--form-error)
--radio-group-status-dangervar(--color-status-danger)
--radio-group-text-defaultvar(--color-text-default)
--radio-group-text-disabledvar(--color-text-disabled)
--radio-group-text-mutedvar(--color-text-muted)

Genutzte Design-Tokens

border.hairlinecolor.action.primarycolor.border.defaultcolor.chart.1color.chart.2color.chart.3color.chart.4color.chart.5color.chart.6color.chart.7color.chart.8color.status.dangercolor.surface.defaultcolor.surface.sunkencolor.text.accentcolor.text.defaultcolor.text.disabledcolor.text.mutedduration.fasteasing.standardfocus.ring-colorfocus.ring-offsetfocus.ring-widthfont.family.defaultform.erroricon.smleading.tightradius.controlradius.surfacesize.05size.1size.10size.16size.2size.24size.3size.4size.40state.disabled-opacitytag.amber.tonetag.blue.tonetag.gray.tonetag.green.tonetag.orange.tonetag.pink.tonetag.red.tonetag.teal.tonetag.violet.tonetext.mdtext.smtext.xsweight.mediumweight.semibold

LLM-Notizen

ui.radio-group

Radiobutton-Gruppe mit einem Optionen-Array — ein name, genau eine Auswahl.

Wann nutzen

  • Wenn alle Optionen sichtbar bleiben sollen (wenige, sich gegenseitig ausschließende Werte).
  • Für viele Optionen oder platzsparende Auswahl stattdessen ui.select.

Wichtige Props

  • label = Gruppen-Überschrift.
  • name = gemeinsamer Feldname aller Radios, Pflicht.
  • options = Array aus { value, label }, Pflicht.
  • value = vorausgewählter Wert.
  • layout = vertical | horizontal.
  • disabled = ganze Gruppe deaktiviert.
  • invalid = Fehlerzustand.
  • hint = Hinweis- oder Fehlertext.

Beispiel-Node


{ "definition": "ui.radio-group", "props": { "label": "Versand", "name": "shipping", "value": "std", "options": [ { "value": "std", "label": "Standard" }, { "value": "express", "label": "Express" } ] } }

Hinweise

  • Die Gruppen-Logik löst das Element selbst — alle Optionen teilen sich name, nur eine ist wählbar.