Single API
Headless single-selection provider — selecting an item automatically deselects the previously selected one, driving tabs, segmented controls, and theme pickers.
Related
Explore these related pages for additional context and usage patterns.
| Page | Category |
|---|---|
| Single | Providers |
| Radio | Forms |
| createSingle | Selection |
| Selection | Providers |
Single.Root
Props
namespace
string | undefinedNamespace for dependency injection (must match SingleItem namespace)
Default: "v0:single"
mandatory
boolean | "force" | undefinedControls mandatory single behavior:
- false (default): No mandatory single enforcement
- true: Prevents deselecting the last selected item
- force: Automatically selects the first non-disabled item on registration
Default: false
modelValue
T | T[] | undefinedSlots
default
SingleRootSlotPropsSingle.Item
Props
Slots
default
SingleItemSlotProps<V>