Skip to content
W WRNexusJS
forms component

RadioGroup

Reusable radio group component.

@wrnexus/ui 0.2.673 props1 slots0 events

Usage

Components are auto-discovered. Use the component directly in any .wrn view:

<RadioGroup
  label="Choose one"
  name="choice"
/>

Legacy mount name: data-component="RadioGroup".

Props and attributes

PropTypeRequirementDefault
classstringOptional""
labelstringOptional"Choose one"
namestringOptional"choice"

Slots

  • default

Events

This component does not declare a custom event.

Source contract

Installed source: components/RadioGroup.wrn

component RadioGroup {
  props {
    class = ""
    label = "Choose one"
    name = "choice"
  }
  view {
        <fieldset class="space-y-3 {class}">
        <legend class="text-sm font-semibold text-slate-900 dark:text-white">{label}</legend>
        <div class="space-y-2">
        <slot />
        </div>
        </fieldset>
    }
}