Documentation Index Fetch the complete documentation index at: https://mintlify.com/vuetifyjs/vuetify/llms.txt
Use this file to discover all available pages before exploring further.
SASS Variables
Vuetify provides a comprehensive set of SASS variables that allow you to customize the framework’s appearance at build time. These variables control everything from spacing and typography to borders and breakpoints.
Getting Started
To customize SASS variables, create a SASS file that overrides the default values before importing Vuetify’s main stylesheet:
// src/styles/settings.scss
@use 'vuetify/settings' with (
$body-font-family : 'Inter, sans-serif' ,
$border-radius-root : 8 px ,
$spacer : 8 px
);
Then import this file in your main entry point before Vuetify:
// main.js
import './styles/settings.scss'
import 'vuetify/styles'
Core Variables
Typography
Control font families, sizes, and text styles:
Font Family
Font Weights
Typography Scale
$body-font-family : var ( --v-font-body , 'Roboto' , sans-serif ) !default ;
$heading-font-family : var ( --v-font-heading , #{$body-font-family} ) !default ;
$font-size-root : 1 rem !default ;
$line-height-root : 1.5 !default ;
Spacing
Vuetify uses a 4px base spacer with 16 steps by default:
$spacer : 4 px !default ;
$spacers-steps : 16 !default ;
// Generates: 0, 4px, 8px, 12px, 16px, 20px, 24px, 28px, 32px...
To use an 8px spacing system: @use 'vuetify/settings' with (
$spacer : 8 px ,
$spacers-steps : 12
);
This generates utility classes like ma-1 (8px), ma-2 (16px), ma-3 (24px), etc.
Borders
Customize border styles, widths, and radii:
Border Basics
Border Radius Scale
Border Widths
$border-color-root : rgba ( var ( --v-border-color ), var ( --v-border-opacity )) !default ;
$border-radius-root : 4 px !default ;
$border-style-root : solid !default ;
$border-width-root : thin !default ;
Opacity & States
Control opacity levels for interactive states:
$opacities : (
hover : var ( --v-hover-opacity ),
focus : var ( --v-focus-opacity ),
selected : var ( --v-selected-opacity ),
activated : var ( --v-activated-opacity ),
pressed : var ( --v-pressed-opacity ),
dragged : var ( --v-dragged-opacity ),
0 : 0 ,
10 : .1 ,
20 : .2 ,
// ... up to 100
) !default ;
$states : (
'hover' : var ( --v-hover-opacity ),
'focus' : var ( --v-focus-opacity ),
'selected' : var ( --v-selected-opacity ),
'activated' : var ( --v-activated-opacity ),
'pressed' : var ( --v-pressed-opacity ),
'dragged' : var ( --v-dragged-opacity )
) !default ;
Breakpoints & Grid
Responsive Breakpoints
Define custom breakpoint values:
$grid-breakpoints : (
'xs' : 0 ,
'sm' : 600 px ,
'md' : 840 px ,
'lg' : 1145 px ,
'xl' : 1545 px ,
'xxl' : 2138 px ,
) !default ;
@use 'vuetify/settings' with (
$grid-breakpoints : (
'xs' : 0 ,
'sm' : 640 px ,
'md' : 768 px ,
'lg' : 1024 px ,
'xl' : 1280 px ,
'xxl' : 1536 px
)
);
This aligns with Tailwind CSS breakpoints for easier migration.
Grid System
Customize grid behavior:
$grid-gutter : $spacer * 6 !default ; // 24px
$grid-columns : 12 !default ;
$container-padding-x : $spacer * 4 !default ; // 16px
$grid-density : (
'default' : 0 ,
'comfortable' : -1 ,
'compact' : -2
) !default ;
Transitions & Animations
Control timing functions and durations:
$standard-easing : cubic-bezier ( 0.4 , 0 , 0.2 , 1 ) !default ;
$decelerated-easing : cubic-bezier ( 0.0 , 0 , 0.2 , 1 ) !default ; // Entering
$accelerated-easing : cubic-bezier ( 0.4 , 0 , 1 , 1 ) !default ; // Leaving
Component Sizing
Define size scales for components:
$sizes : (
'x-small' ,
'small' ,
'default' ,
'large' ,
'x-large'
) !default ;
$size-scale : $spacer * 2 !default ; // 8px
$size-scales : (
'x-small' : -2 , // -16px
'small' : -1 , // -8px
'default' : 0 , // 0px
'large' : 1 , // +8px
'x-large' : 2 // +16px
) !default ;
Elevations
Customize shadow definitions:
$shadow-key-color : rgba ( var ( --v-shadow-color ), var ( --v-shadow-key-opacity , 0.3 )) !default ;
$shadow-ambient-color : rgba ( var ( --v-shadow-color ), var ( --v-shadow-ambient-opacity , 0.15 )) !default ;
$shadow-key : (
0 : ( 0 px 0 px 0 px 0 px $shadow-key-color ),
1 : ( 0 px 1 px 2 px 0 px $shadow-key-color ),
2 : ( 0 px 1 px 2 px 0 px $shadow-key-color ),
3 : ( 0 px 1 px 3 px 0 px $shadow-key-color ),
4 : ( 0 px 2 px 3 px 0 px $shadow-key-color ),
5 : ( 0 px 4 px 4 px 0 px $shadow-key-color )
) !default ;
Complete Example
Here’s a comprehensive example of customizing multiple variables:
// src/styles/settings.scss
@use 'vuetify/settings' with (
// Typography
$body-font-family : 'Inter, system-ui, sans-serif' ,
$heading-font-family : 'Poppins, sans-serif' ,
$font-size-root : 1 rem ,
// Spacing
$spacer : 8 px ,
$spacers-steps : 12 ,
// Borders
$border-radius-root : 8 px ,
$border-width-root : 1 px ,
// Transitions
$transition-duration-root : 0.2 s ,
// Breakpoints
$grid-breakpoints : (
'xs' : 0 ,
'sm' : 640 px ,
'md' : 768 px ,
'lg' : 1024 px ,
'xl' : 1280 px ,
'xxl' : 1536 px
),
// Grid
$grid-gutter : 32 px ,
$container-padding-x : 24 px
);
Variable Reference
All SASS variables are located in /packages/vuetify/src/styles/settings/:
_variables.scss - Core variables (spacing, typography, borders)
_colors.scss - Material color palette
_elevations.scss - Shadow definitions
_utilities.scss - Utility class configuration
SASS variables are evaluated at build time. For runtime customization, use theme configuration instead.