Section separator is a divider line that compartmentalizes content, typically used on cards or white backgrounds.
To ensure that the section separator is properly rendered, please be sure to use our global width prop to set width to 100%. See here for more information on the global width prop.
To guarantee the vertical section separator displays properly, please add the vertical: "stretch"/vertical="stretch" property to the parent container (which is commonly a Flex container). This will stretch the container’s child elements vertically and ensure the section separator appears as expected.
<%= pb_rails("flex", props: {classname: "flex-container", vertical: "stretch"}) do %> <%= pb_rails("body", props: {classname: "flex-item"}) do %> Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua <% end %> <%= pb_rails("section_separator", props: { orientation: "vertical" }) %> <%= pb_rails("body", props: {classname: "flex-item"}) do %> Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua <% end %> <%= pb_rails("section_separator", props: { orientation: "vertical" }) %> <%= pb_rails("body", props: {classname: "flex-item"}) do %> Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua <% end %> <% end %>
Pass anything (including any of our kits) to the children prop to customize a separator's content.
NOTE: passing children overrides any content passed to text
<%= pb_rails("section_separator", props: { line_style: "dashed" }) do %> <%= pb_rails("card", props: { border_radius: "rounded", justify_content: "center", padding: "none" }) do %> <%= pb_rails("caption", props: { text: "TODAY", size: "xs", padding_left: "xs", padding_right: "xs" }) %> <% end %> <% end %> <%= pb_rails("flex", props: { classname: "flex-container", margin_top: "lg", vertical: "stretch" }) do %> <%= pb_rails("body", props: { classname: "flex-item" }) do %> Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua <% end %> <%= pb_rails("section_separator", props: { orientation: "vertical" }) do %> <%= pb_rails("card", props: { border_radius: "rounded", justify_content: "center", padding: "none" }) do %> <%= pb_rails("caption", props: { text: "TODAY", size: "xs", padding_left: "xs", padding_right: "xs" }) %> <% end %> <% end %> <%= pb_rails("body", props: { classname: "flex-item" }) do %> Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua <% end %> <% end %>
Pass "primary" to the color prop to change any section separator color.
NOTE: Passing children overrides any content provided via the text prop. The color prop does not affect the text prop's color, and the color of children is determined by the children's individual props. For greater control over text color customization, consider using a separator with children.
<%= pb_rails("section_separator", props: { text: "Default Separator" }) %> <%= pb_rails("section_separator", props: { color: "primary", text: "Primary Separator" }) %> <%= pb_rails("section_separator", props: { color: "primary", line_style: "dashed", text: "Primary Dashed Separator" }) %> <%= pb_rails("section_separator", props: { color: "primary" }) do %> <%= pb_rails("flex", props: { padding: "xs" }) do %> <%= pb_rails("icon", props: { color: "primary", icon: "arrow-down" }) %> <%= pb_rails("detail", props: { text: "Children", size: "sm", color: "link" }) %> <% end %> <% end %>
| Props | Type | Values |
|---|---|---|
align_content |
enum | responsive
|
start
end
center
spaceBetween
spaceAround
spaceEvenly
|
align_items |
enum | responsive
|
start
end
center
|
border_radius |
enum
|
none
xs
sm
md
lg
xl
rounded
|
cursor |
enum
|
auto
default
none
contextMenu
help
pointer
progress
wait
cell
|
dark |
boolean
|
true
false
|
flex |
enum | responsive
|
auto
initial
0
1
2
3
4
5
6
7
8
9
10
11
12
none
|
flex_direction |
enum | responsive
|
row
column
rowReverse
columnReverse
|
flex_wrap |
enum | responsive
|
wrap
nowrap
wrapReverse
|
justify_content |
enum | responsive
|
start
end
center
spaceBetween
spaceAround
spaceEvenly
|
line_height |
enum
|
loosest
looser
loose
normal
tight
tighter
tightest
|
margin_right |
array
|
none
xxs
xs
sm
md
lg
xl
|
margin_left |
array
|
none
xxs
xs
sm
md
lg
xl
|
margin_top |
array
|
none
xxs
xs
sm
md
lg
xl
|
margin_bottom |
array
|
none
xxs
xs
sm
md
lg
xl
|
margin_x |
array
|
none
xxs
xs
sm
md
lg
xl
|
margin_y |
array
|
none
xxs
xs
sm
md
lg
xl
|
margin |
array
|
none
xxs
xs
sm
md
lg
xl
|
width |
string
|
|
min_width |
string
|
|
max_width |
string
|
|
gap |
string | responsive
|
|
column_gap |
string | responsive
|
|
row_gap |
string | responsive
|
|
number_spacing |
enum
|
tabular
|
order |
enum | responsive
|
none
first
1
2
3
4
5
6
7
8
9
10
11
12
|
overflow_x |
enum
|
scroll
visible
hidden
auto
|
overflow_y |
enum
|
scroll
visible
hidden
auto
|
overflow |
enum
|
scroll
visible
hidden
auto
|
padding_right |
array
|
none
xxs
xs
sm
md
lg
xl
|
padding_left |
array
|
none
xxs
xs
sm
md
lg
xl
|
padding_top |
array
|
none
xxs
xs
sm
md
lg
xl
|
padding_bottom |
array
|
none
xxs
xs
sm
md
lg
xl
|
padding_x |
array
|
none
xxs
xs
sm
md
lg
xl
|
padding_y |
array
|
none
xxs
xs
sm
md
lg
xl
|
padding |
array
|
none
xxs
xs
sm
md
lg
xl
|
position |
enum
|
relative
absolute
fixed
sticky
static
|
shadow |
enum
|
none
deep
deeper
deepest
|
text_align |
enum | responsive
|
start
end
left
right
center
justify
justifyAll
matchParent
|
truncate |
enum
|
none
1
2
3
4
5
|
vertical_align |
enum | responsive
|
baseline
super
top
middle
bottom
sub
text-top
text-bottom
|
z_index |
enum | responsive
|
1
2
3
4
5
6
7
8
9
10
max
|
top |
enum | object
|
xxs
xs
sm
md
lg
xl
xxl
|
inset |
boolean
|
true
false
|
right |
enum | object
|
xxs
xs
sm
md
lg
xl
xxl
|
bottom |
enum | object
|
xxs
xs
sm
md
lg
xl
xxl
|
left |
enum | object
|
xxs
xs
sm
md
lg
xl
xxl
|
height |
string
|
|
max_height |
string
|
|
min_height |
string
|
|
hover |
object
|
|
group_hover |
boolean
|
true
false
|
| Props | Type | Values | Default |
|---|---|---|---|
color |
enum
|
default
primary
|
default
|
line_style |
enum
|
solid
dashed
|
solid
|
orientation |
enum
|
horizontal
vertical
|
horizontal
|
text |
string
|
||
variant |
enum
|
card
background
|
card
|