File tree Expand file tree Collapse file tree
apps/docs/src/pages/components/providers Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -35,6 +35,37 @@ Radio-button-style single selection with size options that automatically deselec
3535
3636:::
3737
38+ ## Features
39+
40+ ### Auto-Enrollment
41+
42+ Set ` enroll ` to automatically select the first registered item. Useful when items are rendered dynamically:
43+
44+ ``` vue
45+ <template>
46+ <!-- First item to register is selected automatically -->
47+ <Single.Root enroll v-model="selected">
48+ <Single.Item v-for="opt in options" :key="opt" :value="opt">
49+ {{ opt }}
50+ </Single.Item>
51+ </Single.Root>
52+ </template>
53+ ```
54+
55+ ### Mandatory Selection
56+
57+ Use ` mandatory ` to prevent deselecting the currently selected item. Use ` mandatory="force" ` to also auto-select the first item on mount:
58+
59+ ``` vue
60+ <template>
61+ <!-- User cannot deselect — at least one item must remain selected -->
62+ <Single.Root mandatory v-model="selected">
63+ <Single.Item value="a">Option A</Single.Item>
64+ <Single.Item value="b">Option B</Single.Item>
65+ </Single.Root>
66+ </template>
67+ ```
68+
3869## Anatomy
3970
4071``` vue Anatomy playground
You can’t perform that action at this time.
0 commit comments