DividerLabel
This page is currently under construction
Lism UI (@lism-css/ui) is still in preparation.
Examples of labeled divider layouts built with Lism.
Examples
↓
Example
…Contents…
Label Text
…Contents…
<Box bgc="base-2" c="text-2" py="40" ta="center">...Contents...</Box><Flex ai="center" g="20" hl="s"> <Divider fx="1" /> <Inline fz="s">Label Text</Inline> <Divider fx="1" /></Flex><Box bgc="base-2" c="text-2" py="40" ta="center">...Contents...</Box><div class="l--box -bgc:base-2 -c:text-2 -py:40 -ta:center">…Contents…</div><div class="l--flex -ai:center -g:20 -hl:s"> <div class="a--divider -fx:1" aria-hidden="true"></div> <span class="-fz:s">Label Text</span> <div class="a--divider -fx:1" aria-hidden="true"></div></div><div class="l--box -bgc:base-2 -c:text-2 -py:40 -ta:center">…Contents…</div> ↓
Example
…Contents…
Label Text
…Contents…
Label Text
…Contents…
<Box bgc="base-2" c="text-2" py="40" ta="center">...Contents...</Box><Flex ai="center" g="15" hl="s"> <span class="-fz:s -px:5">Label Text</span> <Divider fx="1" bdc="currentColor" o="pp" /></Flex><Box bgc="base-2" c="text-2" py="40" ta="center">...Contents...</Box><Flex ai="center" g="15" hl="s" c="blue"> <Divider fx="1" bdc="currentColor" bds="dotted" bdw="4px" o="ppp" /> <span class="-fz:s -px:5">Label Text</span></Flex><Box bgc="base-2" c="text-2" py="40" ta="center">...Contents...</Box><div class="l--box -bgc:base-2 -c:text-2 -py:40 -ta:center">…Contents…</div><div class="l--flex -ai:center -g:15 -hl:s"> <span class="-fz:s -px:5">Label Text</span> <div class="a--divider -fx:1 -o:pp" style="--bdc: currentColor" aria-hidden="true"></div></div><div class="l--box -bgc:base-2 -c:text-2 -py:40 -ta:center">…Contents…</div><div class="l--flex -ai:center -g:15 -hl:s -c" style="--c: var(--blue)"> <div class="a--divider -fx:1 -o:ppp" style="--bdc: currentColor; --bds: dotted; --bdw: 4px" aria-hidden="true"></div> <span class="-fz:s -px:5">Label Text</span></div><div class="l--box -bgc:base-2 -c:text-2 -py:40 -ta:center">…Contents…</div>Vertical orientation
↓
Changing
flex-directionBox
Label
Box
<Flex ai="center" g="15"> <Box fx="1" bgc="base-2" py="40" ta="center"> Box </Box> <Stack ai="center" g="10" hl="s" fz="s" aslf="stretch"> <Divider fx="1" wm="vertical-rl" /> <span>Label</span> <Divider fx="1" wm="vertical-rl" /> </Stack> <Box fx="1" bgc="base-2" py="40" ta="center"> Box </Box></Flex><div class="l--flex -ai:center -g:15"> <div class="l--box -fx:1 -bgc:base-2 -py:40 -ta:center">Box</div> <div class="l--stack -ai:center -g:10 -hl:s -fz:s -aslf:stretch"> <div class="a--divider -wm:vertical-rl -fx:1" aria-hidden="true"></div> <span>Label</span> <div class="a--divider -wm:vertical-rl -fx:1" aria-hidden="true"></div> </div> <div class="l--box -fx:1 -bgc:base-2 -py:40 -ta:center">Box</div></div> ↓
Vertical label text
Box
Label
Box
Label
Box
Resize
<Flex ai="stretch" g="15"> <Box fx="1" bgc="base-2" py="40" ta="center"> Box </Box> <Flex wm="vertical-rl" ai="center" g="15" hl="s" fz="xs" aslf="stretch"> <span class="-px:5">Label</span> <Divider fx="1" /> </Flex> <Box fx="1" bgc="base-2" py="40" ta="center"> Box </Box> <Flex wm="vertical-rl" ai="center" g="15" hl="s" fz="xs" aslf="stretch"> <Divider fx="1" /> <span class="-px:5">Label</span> </Flex> <Box fx="1" bgc="base-2" py="40" ta="center"> Box </Box></Flex><div class="l--flex -ai:stretch -g:15"> <div class="l--box -fx:1 -bgc:base-2 -py:40 -ta:center">Box</div> <div class="l--flex -wm:vertical-rl -ai:center -g:15 -hl:s -fz:xs -aslf:stretch"> <span class="-px:5">Label</span> <div class="a--divider -fx:1" aria-hidden="true"></div> </div> <div class="l--box -fx:1 -bgc:base-2 -py:40 -ta:center">Box</div> <div class="l--flex -wm:vertical-rl -ai:center -g:15 -hl:s -fz:xs -aslf:stretch"> <div class="a--divider -fx:1" aria-hidden="true"></div> <span class="-px:5">Label</span> </div> <div class="l--box -fx:1 -bgc:base-2 -py:40 -ta:center">Box</div></div>