Radio

The form radio element is an important component required to get the multiple choice selection option from the user.

Selected: 1

<script>
    import { Radio } from 'svelte-spectre'

    let group = 1, radios = [ 1, 2, 3 ]
</script>

<Radio
    let:radio
    bind:group
    label=""
    radios={radios}
    inline={false}
    validity={null}>
    {radio.label}
</Radio>
© 2022 — 2023 BASF SE

API Radio

<slot {radio}>
Radio item from array
<Radio let:radio>{radio.some}</Radio>
radios: any[] = []
Radio items array
any array
label: string = ""
Radio label
any string
group: number = 0
Radio selected index
any number
inline: boolean = false
Checkbox inline
true | false
validity: Validity = null
Checkbox validity
null | success | error