Skip to content

SusRadio

SusRadio

Single radio option — pairs with parent SusRadioGroup for exclusive choice.

Package

SusKit · Atoms (commercial)

Open in Playground

SusKit · Atoms

Props

NameTypeDefault
ModelProp<bool>falsev-model
ValueProp<string>""v-model
LabelProp<string>""v-model
ColorProp<string>"primary"v-model
DisabledProp<bool>falsev-model
ReadonlyProp<bool>falsev-model
DensityProp<string>"default"v-model
ErrorProp<string>""v-model
HideDetailsProp<string>"auto"v-model

Slots

No slots.

Events

NameFieldPayload
ChangeOnChangebool

Style hooks

USS class contract — override appearance without touching C#. States toggle via these classes:

  • keyboard-focus
  • sus-radio
  • sus-radio__details
  • sus-radio__dot
  • sus-radio__input
  • sus-radio__label
  • sus-radio--checked
  • sus-radio--danger
  • sus-radio--density-comfortable
  • sus-radio--density-compact
  • sus-radio--density-default
  • sus-radio--disabled
  • sus-radio--error
  • sus-radio--primary
  • sus-radio--readonly
  • sus-radio--secondary
  • sus-radio--success
  • sus-radio--warning

Usage

xml
<template>
  <sus:SusRadio Label="Hard"
                Value="hard"
                Color="primary"
                @change="OnPicked" />
</template>

<script>
void OnPicked(bool selected) { /* … */ }
</script>
csharp
var radio = new SusRadio();
radio.Label.Value = "Normal";
radio.Value.Value = "normal";
radio.Color.Value = "primary";
radio.OnChange += selected => { /* … */ };

Notes

  • Place radios under SusRadioGroup (molecule); the atom registers itself and syncs Model from the group selection.
  • Standalone: drive Model / SyncChecked yourself when not inside a group.
  • Error + HideDetails follow the same form-field pattern as checkbox / text inputs.