runway

Runway

Divider

A customizable divider to separate content horizontally or vertically


With Text


The Divider component is a simple horizontal or vertical line that separates content. It can be customized with different colors, opacity levels, and text.

Use the opacity prop to change the opacity of the divider (0-100).



Usage

javascript

1import Divider from '@/components/atoms/Divider';
2
3<Divider />

Use the text prop to add text to the divider.




Props

The Divider component accepts the following props:

NameTypeDefaultDescription
colorstring"primary"The base color (use tailwind.config).
textstring""Text to display in the divider.
opacitynumber100Opacity of the divider (0-100).
marginnumber2The margin around the divider (in px).
widthnumber0.5The width of the divider (in rem).
heightstring"full"The height of the divider (uses Tailwind height classes).
verticalbooleanfalseIf true, the divider will be vertical.
noWrapbooleantrueIf true, the text will not wrap.
classNamestring""Additional Tailwind utility classes.
...propsobject-Any other valid HTML attributes for the button or Link.



Examples

Horizontal Divider

Vertical Divider

Text on the left
Text on the right

Divider with Text

With Text

Custom Divider


Use the color prop to change the color of the divider ("primary", "purple", "red", etc).