Skip to content

Borders

Utilities for controlling the border of elements in your application.

ClassProperties
borderborder: thin solid rgba(var(--v-border-color), var(--v-border-opacity));
border-thinborder-width: thin;
border-smborder-width: 1px;
border-mdborder-width: 2px;
border-lgborder-width: 4px;
border-xlborder-width: 8px;
border-0border-width: 0;
border-tborder-top-width: thin;
border-t-0border-top-width: 0;
border-t-thinborder-top-width: thin;
border-t-smborder-top-width: 1px;
border-t-mdborder-top-width: 2px;
border-t-lgborder-top-width: 4px;
border-t-xlborder-top-width: 8px;
border-eborder-inline-end-width: thin;
border-e-0border-inline-end-width: 0;
border-e-thinborder-inline-end-width: thin;
border-e-smborder-inline-end-width: 1px;
border-e-mdborder-inline-end-width: 2px;
border-e-lgborder-inline-end-width: 4px;
border-e-xlborder-inline-end-width: 8px;
border-bborder-bottom-width: thin;
border-b-0border-bottom-width: 0;
border-b-thinborder-bottom-width: thin;
border-b-smborder-bottom-width: 1px;
border-b-mdborder-bottom-width: 2px;
border-b-lgborder-bottom-width: 4px;
border-b-xlborder-bottom-width: 8px;
border-sborder-inline-start-width: thin;
border-s-0border-inline-start-width: 0;
border-s-thinborder-inline-start-width: thin;
border-s-smborder-inline-start-width: 1px;
border-s-mdborder-inline-start-width: 2px;
border-s-lgborder-inline-start-width: 4px;
border-s-xlborder-inline-start-width: 8px;
border-opacity-0--v-border-opacity: 0;
border-opacity--v-border-opacity: .12;
border-opacity-25--v-border-opacity: .25;
border-opacity-50--v-border-opacity: .5;
border-opacity-75--v-border-opacity: .75;
border-opacity-100--v-border-opacity: 1;
border-dashedborder-style: dashed;
border-dottedborder-style: dotted;
border-doubleborder-style: double;
border-solidborder-style: solid;

Usage

The border utilities allow you to quickly style the border of any element.

All sides

Use the border, border-0, border-sm, border-md, border-lg, and border-xl classes to set the border width of an element.

Individual sides

Use the border-*, border-*-0, border-*-sm, border-*-md, border-*-lg, and border-*-xl classes to set the border width of an element on a specific side.

Border styles

Use the border-dashed, border-dotted, border-double, and border-solid classes to set the border style of an element.

Theme colors

Components that support the border property can take advantage of all border utility classes. This includes colors generated by your theme.

ClassProperties
border-primary--v-border-color: var(--v-theme-primary);
border-secondary--v-border-color: var(--v-theme-secondary);
border-accent--v-border-color: var(--v-theme-accent);
border-error--v-border-color: var(--v-theme-error);
border-info--v-border-color: var(--v-theme-info);
border-success--v-border-color: var(--v-theme-success);
border-warning--v-border-color: var(--v-theme-warning);
border-surface--v-border-color: var(--v-theme-surface);
border-background--v-border-color: var(--v-theme-background);
border-surface-light--v-border-color: var(--v-theme-surface-light);
border-surface-variant--v-border-color: var(--v-theme-surface-variant);
border-surface-bright--v-border-color: var(--v-theme-surface-bright);

Components

INFO

When using the border property on components, omit the border- prefix. For example, use border="sm" instead of border="border-sm".

Setting the border property to true applies a component specific border class, such as v-card--border. This is to ensure that basic border usage persists even if the utility classes are disabled.

SASS variables

You can also use the following SASS variables to customize the border color and width:

sass
@use 'vuetify/settings' with (
  $borders: (
    0: 0,
    null: thin,
    thin: thin,
    sm: 1px,
    md: 2px,
    lg: 4px,
    xl: 8px
  )
);

Disable border class generation by setting the $borders variable to false.

sass
@use 'vuetify/settings' with (
  $borders: false
);

Released under the MIT License.