Layout & structure
IContainer
A centred, max-width wrapper with the page's horizontal gutter. Use one per page region instead of repeating mx-auto max-w-… px-… by hand.
<IContainer size="lg">
<IPageHeader title="Invoices" />
<ITable :columns="columns" :rows="rows" />
</IContainer>Sizes
Every size is wider than this column, so the five are drawn to scale against xl:
size | Max width |
|---|---|
sm | max-w-3xl — 768px |
md | max-w-5xl — 1024px |
lg | max-w-6xl — 1152px |
xl | max-w-7xl — 1280px (default) |
full | No maximum; still centres and still takes the gutter |
A container caps a whole page. For a readable line length, constrain the text itself inside one.
Gutter
The gutter is the horizontal padding that keeps content off the window edge. Each one is a ramp rather than a number — md is px-4 on a phone, px-6 from sm, px-8 from lg — because a single value has to pick a side: enough room on a wide window leaves a phone with no width left for the content itself.
none is for when the child draws its own gutter — a full-bleed image, or a table that should touch the edges on a phone. Take none and set your own class when you want one fixed value at every width.
Inside the app shell
IAppShell sets no width of its own. Put a container inside its main region:
<IAppShell>
<template #sidebar>
<ISidebar :items="sections" />
</template>
<IContainer class="py-8">
<IPageHeader title="Invoices" />
<ITable :columns="columns" :rows="rows" />
</IContainer>
</IAppShell>Props
| Prop | Type | Default | Description |
|---|---|---|---|
size | 'sm' | 'md' | 'lg' | 'xl' | 'full' | 'xl' | Maximum width |
gutter | 'none' | 'sm' | 'md' | 'lg' | 'md' | Horizontal padding |
as | string | 'div' | Element to render |
asChild | boolean | false | Render the child instead, forwarding props |
unstyled | boolean | — | Drop built-in classes |
class | string | — | Merged with the built-in classes |
ui | { root? } | — | Per-element class overrides |
The widths come from Tailwind v4's width scale.