BlogPlaygroundOne

Dividers

The v-divider component is used to separate sections of lists or layouts.

Usage

Dividers in their simplest form display a horizontal line.

<v-divider></v-divider>

API

ComponentDescription
v-dividerThe divider component.
Toggle Inline API

Examples

Props

Inset

Inset dividers are moved 72px to the right. This will cause them to line up with list items.

Today
Brunch this weekend?
Ali Connors — I'll be in your neighborhood doing errands this weekend. Do you want to hang out?
Summer BBQ 4
to Alex, Scott, Jennifer — Wish I could come, but I'm out of town this weekend.
Oui oui
Sandra Adams — Do you have Paris recommendations? Have you ever been?

Gradient

Easily enable fading effect with gradient prop for a modern look.

OR
AND
OR
AND

Vertical

Vertical dividers give you more tools for unique layouts.

dividers with vertical
Title
My Home
dividers with vertical and inset
Title
My Home

Slots

Default

When you pass any content to be placed in between dividers simply by utilizing the default slot.

CHAPTER 1.4
* * *

Misc

Portrait View

Create custom cards to fit any use-case.

Sarah Mcbeal
(650) 555-1234
(323) 555-6789
mcbeal@example.com
Orlando, FL 79938

Subheaders

Dividers and subheaders can help break up content and can optionally line up with one another by using the same inset prop.

Message Board
Today
Meeting @ Noon
Spike Lee — I'll be in your neighborhood
Summer BBQ
to Operations support — Wish I could come.
Yes yes
Bella — Do you have Paris recommendations
Yesterday
Dinner tonight?
LaToya — Do you want to hang out?
So long
Nancy — Do you see what time it is?
Last Week
Breakfast?
LaToya — Do you want to hang out?
Winter Porridge
cc: Daniel — Tell me more...
Oui oui
Nancy — Do you see what time it is?

Accessibility

By default, v-divider components are assigned the WAI-ARIA role of separator which denotes that the divider “separates and distinguishes sections of content or groups of menu items.” However, sometimes a divider is just a way to make an interface look nice. In those cases, the role of presentation should be used which denotes “an element whose implicit native role semantics will not be mapped to the accessibility API.” To override the default separator role in a v-divider, simply add a role="presentation" prop to your component. In addition, v-divider components have an aria-orientation="horizontal". If vertical="true", then aria-orientation="vertical" will be set automatically as well. If role="presentation", aria-orientation="undefined", its default value.

Ready for more?

Continue your learning with related content selected by the Team or move between pages by using the navigation links below.