Build fully custom content separators with complete control over layout and styling.
Invoice No0000123
Issued01/01/2026
Due Date02/02/2026
Fast setup, no credit card required.
basic-demo
Pre-styled Versions
Choose a pre-styled library to use Divider with ready-made designs.
For hook-based usage without components, see the Headless API.
Features#
- Horizontal and vertical orientations
- Three border types:
solid,dashed,dotted - Content alignment within the divider line (
left,center,rightfor horizontal;top,center,bottomfor vertical)
Usage#
import { Divider } from 'primereact/divider';<Divider />Behavior#
Polymorphic Rendering#
Use as to change the rendered HTML element.
<Divider as="hr" />Default element: div.
Render Function Children#
Divider accepts a render function as children, providing access to the component instance.
<Divider>{(instance) => <span>{instance.divider?.props.orientation}</span>}</Divider>Pass Through#
Some parts may not be visible in the preview depending on the component's current state.
Loading...
/* Select a part to see its CSS selector for custom styling */API#
DividerRoot#
Accessibility#
Screen Reader#
Divider uses role="separator" with aria-orientation set to either "horizontal" or "vertical".
Keyboard Support#
Component does not include any interactive elements.