Vertical rule
Source: https://getbootstrap.com/docs/6.0/helpers/vertical-rule
Use the custom vertical rule helper to create vertical dividers like the <hr> element.
How it works
Vertical rules are inspired by the <hr> element, allowing you to create vertical dividers in common layouts. They’re styled just like <hr> elements:
- They’re
1pxwide - They have
min-heightof1em - Their color is set via
currentColorandopacity
Customize them with additional styles as needed.
Example
<Example code={<div class="vr"></div>} />
Vertical rules scale their height in flex layouts:
<div class="vr"></div>
</div>`} />
With stacks
They can also be used in stacks:
<div class="p-2">First item</div>
<div class="p-2 ms-auto">Second item</div>
<div class="vr"></div>
<div class="p-2">Third item</div>
</div>`} />
CSS
Vertical rules use a CSS variable with fallback for their default border width. Out of the box, --vr-border-width is unassigned, meaning it defaults to the value of --border-width.
