The Separator component is built on top of the Base UI Separator component as a baseline, with a couple of additional functionalities that we deemed essential: text and orientation.
Installation
Here is the component implementation code that you can copy to your project:
The Separator component supports both horizontal and vertical orientations. Use the orientation prop with horizontal (default) or vertical to control the separator direction.
Separator with text
For horizontal separators, you can add text in the middle using the text prop. This is useful for "or" dividers or section labels.
Or
Vertical separator
Vertical separators can be used to divide content horizontally, such as in navigation bars or between columns.