Divider
A horizontal or vertical rule.
Attributes
Section titled “Attributes”| Attribute | Type | Default | Description |
|---|---|---|---|
direction |
string | horizontal |
horizontal or vertical |
color |
color | line |
Line color. The line color token is a mid grey, #737373, and a document can give it another value in its tokens |
data-color |
string | — | Dot-path: sets color from the data. See Attributes from data |
thickness |
token/length | xs |
Line thickness: a border token (xs 0.5pt, s 1pt, m 1.5pt, l 2pt, xl 3pt, xxl 4pt) or a length such as 1pt |
ocg |
string | — | print or screen: shown only in print, or only on screen. See Print and screen content |
Horizontal rule
Section titled “Horizontal rule”<column gap="16pt"> <text font-size="18pt">Section heading</text> <divider/> <text>Body text below the rule.</text></column>L.column({ gap: '16pt' }, [ L.text({ fontSize: '18pt' }, ['Section heading']), L.divider(NoAttr), L.text(NoAttr, ['Body text below the rule.']),])L.column(ColumnAttr(gap='16pt'), [ L.text(TextAttr(font_size='18pt'), ['Section heading']), L.divider(NoAttr), L.text(NoAttr, ['Body text below the rule.'])])L.column(new ColumnAttr().gap("16pt"), List.of( L.text(new TextAttr().fontSize("18pt"), List.of("Section heading")), L.divider(NoAttr), L.text(NoAttr, List.of("Body text below the rule."))))L.Column(new() { Gap = "16pt" }, [ L.Text(new() { FontSize = "18pt" }, ["Section heading"]), L.Divider(NoAttr), L.Text(NoAttr, ["Body text below the rule."]),])L::column(new ColumnAttr(gap: '16pt'), [ L::text(new TextAttr(fontSize: '18pt'), ['Section heading']), L::divider(NoAttr), L::text(NoAttr, ['Body text below the rule.']),])Styled divider
Section titled “Styled divider”<divider color="#1a73e8" thickness="s"/>L.divider({ color: '#1a73e8', thickness: 's' })L.divider(DividerAttr(color='#1a73e8', thickness='s'))L.divider(new DividerAttr().color("#1a73e8").thickness("s"))L.Divider(new() { Color = "#1a73e8", Thickness = "s" })L::divider(new DividerAttr(color: '#1a73e8', thickness: 's'))Vertical divider inside a row
Section titled “Vertical divider inside a row”<row align="center" gap="16pt"> <text>Left</text> <divider direction="vertical"/> <text width="fill">Right</text></row>L.row({ align: 'center', gap: '16pt' }, [ L.text(NoAttr, ['Left']), L.divider({ direction: 'vertical' }), L.text({ width: 'fill' }, ['Right']),])L.row(RowAttr(align='center', gap='16pt'), [ L.text(NoAttr, ['Left']), L.divider(DividerAttr(direction='vertical')), L.text(TextAttr(width='fill'), ['Right'])])L.row(new RowAttr().align("center").gap("16pt"), List.of( L.text(NoAttr, List.of("Left")), L.divider(new DividerAttr().direction("vertical")), L.text(new TextAttr().width("fill"), List.of("Right"))))L.Row(new() { Align = "center", Gap = "16pt" }, [ L.Text(NoAttr, ["Left"]), L.Divider(new() { Direction = "vertical" }), L.Text(new() { Width = "fill" }, ["Right"]),])L::row(new RowAttr(align: 'center', gap: '16pt'), [ L::text(NoAttr, ['Left']), L::divider(new DividerAttr(direction: 'vertical')), L::text(new TextAttr(width: 'fill'), ['Right']),])