| defaultValue | boolean | false | |
- Name
- defaultValue
- Description
The pressed state of the toggle when it is initially rendered. Use when you do not need to control its open state. - Type
boolean- Default
- false
|
| modelValue | boolean | null | — | |
- Name
- modelValue
- Description
The controlled pressed state of the toggle. Can be bind as v-model. - Type
null | boolean- Default
- —
|
| disabled | boolean | false | |
- Name
- disabled
- Description
When true, prevents the user from interacting with the toggle. - Type
boolean- Default
- false
|
| asChild | boolean | false | |
- Name
- asChild
- Description
Change the default rendered element for the one passed as a child, merging their props and behavior. Read our Composition guide for more details. - Type
boolean- Default
- false
|
| as | AsTag | Component | 'button' | |
- Name
- as
- Description
The element or component this component should render as. Can be overwritten by asChild. - Type
ComponentOptions<any, any, any, ComputedOptions, MethodOptions, any, any, any, string, {}, {}, string, {}, {}, {}, string, ComponentProvideOptions> | (props: any, ctx: Omit<{ attrs: Attrs; slots: Readonly<InternalSlots>; emit: (event: string, ...args: any[]) => void; expose: <Exposed extends Record<string, any> = Record<string, any>>(exposed?: Exposed | undefined) => void; }, 'expose'>): any | ComponentPublicInstanceConstructor<any, any, any, any, ComputedOptions, MethodOptions> | 'a' | 'button' | 'div' | 'form' | 'h2' | 'h3' | 'img' | 'input' | 'label' | 'li' | 'nav' | 'ol' | 'p' | 'span' | 'svg' | 'ul' | 'template' | {} & string- Default
- 'button'
|
| name | string | — | |
- Name
- name
- Description
The name of the field. Submitted with its owning form as part of a name/value pair. - Type
string- Default
- —
|
| required | boolean | false | |
- Name
- required
- Description
When true, indicates that the user must set the value before the owning form can be submitted. - Type
boolean- Default
- false
|
| class | ClassValue | — | |
- Name
- class
- Description
Classes added to the part's own element, after its recipe classes. - Type
null | string | false | Record<string, any> | ClassValue[]- Default
- —
|
| variant | 'default' | 'outline' | 'default' | |
- Name
- variant
- Description
The visual style: transparent or outlined. - Type
'default' | 'outline'- Default
- 'default'
|
| size | 'md' | 'sm' | 'lg' | 'icon-sm' | 'icon-md' | 'icon-lg' | 'md' | |
- Name
- size
- Description
The height and padding of the toggle; the icon sizes make a square toggle that holds only an icon. - Type
'md' | 'sm' | 'lg' | 'icon-sm' | 'icon-md' | 'icon-lg'- Default
- 'md'
|