BlogPlaygroundOne

VSelectionControl API


Props
name
type
default
string
undefined

Sets the color of the input when it is not focused.

string
undefined

Applies specified color to the control - supports utility colors with or without text- prefix (for example success, purple or text-purple) or CSS color (#033 or rgba(255, 0, 0, 0.5)). Find a list of built-in classes on the colors page.

string
undefined

The target component to provide defaults values for.

'default' | 'comfortable' | 'compact'
'default'

Adjusts the vertical height used by the component.

boolean
null

Removes the ability to click or target the component.

boolean
false

Puts the input in a manual error state.

  | string
  | (string | [string, number])[]
  | (new () => any)
  | FunctionalComponent
undefined

The icon used when inactive.

any
undefined

Sets value for falsy state.

string
undefined

Sets the DOM id on the component.

boolean
false

Puts children inputs into a row.

string
undefined

Sets the text of the v-label or v-field-label component.

unknown
undefined

The v-model value of the component. If component supports the multiple prop, this defaults to an empty array.

boolean
null

Changes select to multiple. Accepts array for value.

string
undefined

Sets the component’s name attribute.

boolean
null

Puts input in readonly state.

boolean | { class: string; keys: string[] }
true

Applies the v-ripple directive.

string
undefined

Specify a theme for this component and all of its children.

  | string
  | (string | [string, number])[]
  | (new () => any)
  | FunctionalComponent
undefined

The icon used when active.

any
undefined

Sets value for truthy state.

string
undefined

Provides the default type for children selection controls.

any
undefined

The value used when the component is selected in a group. If not provided, a unique ID will be used.

(a: any, b: any) => boolean
undefined

Apply a custom comparison algorithm to compare model-value and values contains in the items prop.

Events
name
type
[unknown]

Event that is emitted when the component’s model changes.

Slots
{ backgroundColorClasses: Ref<string[], string[]> backgroundColorStyles: Ref<CSSProperties, CSSProperties> }
{ model: WritableComputedRef<boolean, boolean> textColorClasses: Ref<string[], string[]> textColorStyles: Ref<CSSProperties, CSSProperties> backgroundColorClasses: Ref<string[], string[]> backgroundColorStyles: Ref<CSSProperties, CSSProperties> inputNode: VNode<RendererNode, RendererElement, { [key: string]: any }> icon: | string | (string | [string, number])[] | (new () => any) | FunctionalComponent props: { onBlur: (e: Event) => void onFocus: (e: FocusEvent) => void id: string } }
{ label: string; props: Record<string, unknown> }

The default Vue slot.

The slot used for the default input element.

The default slot of the v-label or v-field-label component.

Exposed
HTMLInputElement
boolean

Reference to the root input element.

Will return true if the component is currently focused.

SASS Variables
name
default
tools.theme-color('on-surface', var(--v-high-emphasis-opacity))
('default': 0, 'comfortable': -1, 'compact': -3)
tools.theme-color('on-surface', var(--v-disabled-opacity))
rgb(var(--v-theme-error))
40px