Divider
A horizontal or vertical rule.
Attributes
Section titled “Attributes”| Attribute | Type | Default | Description |
|---|---|---|---|
direction |
string | horizontal |
horizontal or vertical |
color |
color | #000000 |
Line color |
thickness |
token/pt | 1pt |
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 |
Horizontal rule
Section titled “Horizontal rule”<stack gap="16pt"> <text font-size="18pt">Section heading</text> <divider/> <text>Body text below the rule.</text></stack>L.stack({ gap: '16pt' }, [ L.text({ fontSize: '18pt' }, ['Section heading']), L.divider(NoAttr), L.text(NoAttr, ['Body text below the rule.']),])L.stack(StackAttr(gap='16pt'), [ L.text(TextAttr(font_size='18pt'), ['Section heading']), L.divider(NoAttr), L.text(NoAttr, ['Body text below the rule.'])])L::stack(new StackAttr(gap: '16pt'), [ L::text(new TextAttr(fontSize: '18pt'), ['Section heading']), L::divider(NoAttr), L::text(NoAttr, ['Body text below the rule.']),])L.Stack(new() { Gap = "16pt" }, [ L.Text(new() { 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" })Vertical divider inside a flank
Section titled “Vertical divider inside a flank”<flank align="center" gap="16pt"> <text>Left</text> <divider direction="vertical"/> <text>Right</text></flank>L.flank({ align: 'center', gap: '16pt' }, [ L.text(NoAttr, ['Left']), L.divider({ direction: 'vertical' }), L.text(NoAttr, ['Right']),])L.flank(FlankAttr(align='center', gap='16pt'), [ L.text(NoAttr, ['Left']), L.divider(DividerAttr(direction='vertical')), L.text(NoAttr, ['Right'])])L::flank(new FlankAttr(align: 'center', gap: '16pt'), [ L::text(NoAttr, ['Left']), L::divider(new DividerAttr(direction: 'vertical')), L::text(NoAttr, ['Right']),])L.Flank(new() { Align = "center", Gap = "16pt" }, [ L.Text(NoAttr, ["Left"]), L.Divider(new() { Direction = "vertical" }), L.Text(NoAttr, ["Right"]),])