VBtn API
name | type | default |
|---|---|---|
boolean
| undefined | |
Controls the active state of the item. This is typically used to highlight the component. | ||
string
| undefined | |
The applied color when the component is in an active state. | ||
| string | (string | [string, number])[] | (new () => any) | FunctionalComponent | undefined | |
Creates a v-icon component after default content in the append slot. | ||
string
| undefined | |
Sets the color of component when not focused. | ||
boolean
| false | |
Expands the button to 100% of available space. | ||
string | number | boolean | false | |
Applies utility border classes to the component. To use it, you need to omit the | ||
string
| undefined | |
Applies specified color to the control - supports utility colors with or without | ||
'default' | 'comfortable' | 'compact' | 'default' | |
Adjusts the vertical height used by the component. | ||
boolean
| false | |
Removes the ability to click or target the component. | ||
string | number | undefined | |
Designates an elevation applied to the component between 0 and 5. You can find more information on the elevation page. | ||
boolean
| false | |
Exactly match the link. Without this, ‘/’ will match every route. You can find more information about the exact prop on the vue-router documentation. | ||
boolean
| false | |
Removes the button box shadow. This is different than using the ‘flat’ variant. | ||
string | number | undefined | |
Sets the height for the component. | ||
string
| undefined | |
Designates the component as anchor and applies the href attribute. | ||
| boolean | string | (string | [string, number])[] | (new () => any) | FunctionalComponent | false | |
Apply a specific icon using the v-icon component. The button will become round. | ||
string | boolean | false | |
Displays linear progress bar. Can either be a String which specifies which color is applied to the progress bar (any material color or theme color - primary, secondary, success, info, warning, error) or a Boolean which uses the component color (set by color prop - if it’s supported by the component) or the primary color. | ||
Anchor | undefined | |
Specifies the component’s location. Can combine by using a space separated string. | ||
string | number | undefined | |
Sets the maximum height for the component. | ||
string | number | undefined | |
Sets the maximum width for the component. | ||
string | number | undefined | |
Sets the minimum height for the component. | ||
string | number | undefined | |
Sets the minimum width for the component. | ||
'fixed' | 'static' | 'relative' | 'absolute' | 'sticky' | undefined | |
Sets the position for the component. | ||
| string | (string | [string, number])[] | (new () => any) | FunctionalComponent | undefined | |
Creates a v-icon component in the prepend slot before default content. | ||
boolean
| false | |
Puts the button in a readonly state. Cannot be clicked or navigated to by keyboard. | ||
boolean
| false | |
Setting replace prop will call | ||
boolean | { class: string; keys: string[] } | true | |
Applies the v-ripple directive. | ||
string | number | boolean | undefined | |
Designates the border-radius applied to the component. This can be 0, xs, sm, true, lg, xl, pill, circle, and shaped. Find more information on available border radius classes on the Border Radius page. | ||
string
| undefined | |
Configure the active CSS class applied when an item is selected. | ||
string | number | 'default' | |
Sets the height and width of the component. Default unit is px. Can also use the following predefined sizes: x-small, small, default, large, and x-large. | ||
boolean
| false | |
Reduces padding to 0 8px. | ||
'end' | 'start' | 'both' | undefined | |
Extends content to the edges to move main content from prepend and append slots. | ||
boolean
| false | |
Displays the button as a flex-column. | ||
any
| undefined | |
The Symbol used to hook into group functionality for components like v-btn-toggle and v-bottom-navigation. | ||
string | (new () => any) | FunctionalComponent | 'button' | |
Specify a custom tag used on the root element. | ||
string | number | boolean | undefined | |
Specify content text for the component. | ||
string
| undefined | |
Specify a theme for this component and all of its children. | ||
boolean
| false | |
Removes any applied border-radius from the component. | ||
string | RouteLocationAsRelativeGeneric | RouteLocationAsPathGeneric | undefined | |
Denotes the target route of the link. You can find more information about the to prop on the vue-router documentation. | ||
any
| undefined | |
The value used when the component is selected in a group. If not provided, a unique ID will be used. | ||
'text' | 'flat' | 'elevated' | 'tonal' | 'outlined' | 'plain' | 'elevated' | |
Applies a distinct style to the component. | ||
string | number | undefined | |
Sets the width for the component. | ||
name | type | |
|---|---|---|
[{ value: boolean }] | ||
Event that is emitted when an item is selected within a group. | ||
Internal representation when used in VBtnToggle. | ||
name | default |
|---|---|
rgb(var(--v-theme-surface)) | |
0 8px | |
( $button-border-color, $button-border-style, $button-border-width, $button-border-thin-width ) | |
settings.$border-color-root | |
settings.$border-radius-root | |
settings.$border-style-root | |
thin | |
0 | |
0 8px | |
tools.theme-color('on-surface', var(--v-high-emphasis-opacity)) | |
true | |
('default': 0, 'comfortable': -2, 'compact': -3) | |
0.26 | |
0.12 | |
('default': 1, 'hover': 2, 'active': 1) | |
tools.map-deep-get(settings.$typography, 'label-large', 'size') | |
tools.map-deep-get(settings.$typography, 'label-large', 'weight') | |
36px | |
map.get(settings.$rounded, 'circle') | |
('default': 3, 'comfortable': 0, 'compact': -2) | |
1rem | |
normal | |
1.5em | |
calc(var(--v-btn-height) / #{$button-margin-end-multiplier}) | |
4.5 | |
calc(var(--v-btn-height) / #{$button-margin-start-multiplier}) | |
-9 | |
100% | |
2.25 | |
settings.$border-radius-root | |
5px | |
map.get(settings.$rounded, 'circle') | |
.62 | |
absolute fixed | |
map.get(settings.$rounded, 'xl') | |
map.merge( ( 'height': $button-height, 'font-size': $button-font-size, 'width-ratio': $button-width-ratio, 'padding-ratio': $button-padding-ratio ), $button-sizes ) | |
0 8px | |
('default': 0, 'comfortable': -4, 'compact': -6) | |
4px | |
72px | |
1.25 | |
4.5 | |
map.merge( ( 'height': $button-stacked-height, 'font-size': $button-font-size, 'width-ratio': $button-stacked-width-ratio, 'padding-ratio': $button-stacked-padding-ratio ), $button-stacked-sizes ) | |
1 | |
tools.map-deep-get(settings.$typography, 'label-large', 'letter-spacing') | |
none | |
box-shadow, transform, opacity, background | |
( $button-background, $button-color, map.get($button-elevation, 'default'), $button-plain-opacity, 'v-btn' ) | |
middle | |
nowrap | |
math.div(16, 9) |