Page containers: container_fixed/1 centers its content up to the xl breakpoint (1280px),
container_fluid/1 fills the width. Both keep a 24px gutter.
<.container_fixed>
<h1>Title</h1>
</.container_fixed>The sizing is in the stylesheet (lu-container-fixed, lu-container-fluid), so a style or a
class of the caller only adds to it.
Preview
preview draws the canvas diagram of a container instead of a real one: a hatched bar (lu-cont) with
the accent span that shows the width of a size (sm 640px, md 768px, lg 1024px, xl 1280px,
2xl 1536px, prose 68ch, full 100%). label and width override the text and the span width;
the slot is ignored. For the documentation and the showcase only.
<.container_fixed preview size="lg" style="flex:1" />
Summary
Functions
A centered container with a gutter, sized by size.
A centered container, as wide as the xl breakpoint at most.
A container as wide as its parent.
Functions
A centered container with a gutter, sized by size.
<.container size="lg">...</.container>
<.container size="prose" class="py-10">...</.container>Attributes
size(:string) - The widest the content gets:sm640px,md768px,lg1024px,xl1280px,2xl1536px,prose68ch,fullthe parent's width. Without it, ascontainer_fixed/1. Defaults tonil. Must be one ofnil,"full","2xl","lg","md","prose","sm", or"xl".class(:any) - Defaults tonil.style(:string) - Defaults tonil.- Global attributes are accepted.
Slots
inner_block
A centered container, as wide as the xl breakpoint at most.
Attributes
preview(:boolean) - The canvas diagram of a container. Defaults tofalse.size(:string) - Withpreview: the size drawn. Defaults tonil. Must be one ofnil,"2xl","full","lg","md","prose","sm", or"xl".label(:string) - Withpreview: the text of the bar. Defaults tonil.width(:string) - Withpreview: the width of the bar. Defaults tonil.class(:any) - Defaults tonil.- Global attributes are accepted.
Slots
inner_block
A container as wide as its parent.
Attributes
preview(:boolean) - The canvas diagram of a container. Defaults tofalse.size(:string) - Withpreview: the size drawn. Defaults tonil. Must be one ofnil,"2xl","full","lg","md","prose","sm", or"xl".label(:string) - Withpreview: the text of the bar. Defaults tonil.width(:string) - Withpreview: the width of the bar. Defaults tonil.class(:any) - Defaults tonil.- Global attributes are accepted.
Slots
inner_block