content
Tailwind CSS Divider
A divider is employed to separate content either vertically or horizontally.
Utilize the component class divider
to create vertical content divisions. Apply the modifier class divider-{semantic-color}
to specify different colors for the dividers.
Use the responsive class divider-horizontal
with the component class divider
to create horizontal content divisions.
Add text or icon within the divider markup to show it within the horizontal divider line.
Insert icons or text into the divider markup following the examples below to display them within the divider line.
The following example represents the default style for the divider line.
Apply the modifier class divider-dotted
to display the divider line in a dotted pattern.
Apply the modifier class divider-dashed
to display the divider line in a dashed pattern.
Utilize the TailwindCSS state classes after:
and before:
along with the border classes border-e-*
for vertical dividers and border-t-*
for horizontal dividers to customize their thickness.
Use the responsive classes divider-start
and divider-end
to position content at the start and end positions, respectively. By default, the content is centered.
Use the responsive classes divider-start
and divider-end
to position content at the start and end positions in horizontal divider, respectively. By default, the content is centered.
The responsive dividers adapt according to breakpoints.
Use TailwindCSS classes for responsive design, such as sm:
, md:
, lg:
, xl:
, and 2xl:
, along with the responsive class divider-horizontal
, to switch the divider alignment to horizontal at specific breakpoints.
Utilize responsive breakpoint classes alongside the responsive class divider-vertical
to adjust the divider alignment to vertical at specific breakpoints.
Use the example below to implement buttons with a responsive horizontal divider.
Use the example below to implement buttons with a vertical divider.