Welcome to Vanilla Breeze
This bell pulls live notifications from /go/notify/messages — the same contract documented at /docs/concepts/service-contracts/. Static articles like this one are the no-JS / no-backend fallback.
This bell pulls live notifications from /go/notify/messages — the same contract documented at /docs/concepts/service-contracts/. Static articles like this one are the no-JS / no-backend fallback.
Container component with background, padding, and visual variants. Simple block mode by default; add header/section/footer children to activate structured grid mode.
| Attribute | Values | Default | Description |
|---|---|---|---|
data-variant |
default, elevated, outlined, ghost |
default |
Visual style variant |
data-padding |
none, s, m, l, xl |
m |
Internal padding (applies to children in grid mode) |
data-max |
narrow, content, wide |
- | Max-width constraint for centered card patterns |
By default, layout-card is a simple block container with padding. Use it for any content that just needs a card surface.
<layout-card> Default card with subtle shadow</layout-card> <layout-card data-variant="elevated"> Elevated card with stronger shadow</layout-card> <layout-card data-variant="outlined"> Outlined card with border</layout-card> <layout-card data-variant="ghost"> Ghost card with no background</layout-card>
Add <header>, <section>, or <footer> children to automatically activate CSS Grid with named areas. No extra attributes needed — the :has() selector detects semantic children.
<layout-card> <header><h3>Card Title</h3></header> <section> <p>Content with automatic grid placement.</p> </section> <footer> <button type="button" class="secondary">Cancel</button> <button type="button">Save</button> </footer></layout-card>
<header> maps to the header grid area with a bottom border<section> maps to the content grid area (expands to fill)<footer> maps to the footer grid area with a top border and flex layout for actionsslot attribute are implicitly placed in the content areaAll visual variants work in both block and grid modes.
The data-padding attribute controls spacing in all grid areas.
<!-- Small padding --><layout-card data-padding="s"> <header><h3>Compact</h3></header> <section><p>Small padding for dense layouts.</p></section> <footer><button>OK</button></footer></layout-card> <!-- Large padding --><layout-card data-padding="l"> <header><h3>Spacious</h3></header> <section><p>Large padding for prominent content.</p></section> <footer><button>OK</button></footer></layout-card>
Use slot="content" for non-semantic elements that should go in the content grid area.
<layout-card> <header><h3>Quote Card</h3></header> <blockquote slot="content"> "The only way to do great work is to love what you do." </blockquote></layout-card>
The data-padding attribute controls the internal spacing.
<layout-card> <layout-stack data-layout-gap="m"> <div data-media data-layout-ratio="16:9" data-radius="s"> <img src="image.jpg" alt="Card image" loading="lazy" /> </div> <layout-stack data-layout-gap="xs"> <h3>Card Title</h3> <p>Brief description of the card content.</p> </layout-stack> <layout-cluster data-layout-gap="s"> <button type="button">Primary</button> <button type="button" class="secondary">Secondary</button> </layout-cluster> </layout-stack></layout-card>
<layout-card data-variant="outlined"> <layout-stack data-layout-gap="m"> <div data-media data-layout-ratio="1:1" data-radius="s"> <img src="product.jpg" alt="Product image" loading="lazy" /> </div> <layout-stack data-layout-gap="xs"> <small>Category</small> <strong>Product Name</strong> <strong>$49.99</strong> </layout-stack> <button type="button">Add to Cart</button> </layout-stack></layout-card>
<layout-grid data-layout-min="15rem" data-layout-gap="m"> <layout-card data-variant="elevated" data-padding="l"> <layout-stack data-layout-gap="xs"> <small>Total Revenue</small> <strong>$45,231</strong> <small>+12.5% from last month</small> </layout-stack> </layout-card></layout-grid>
<layout-card data-padding="l"> <layout-stack data-layout-gap="m"> <h3>Outer Card</h3> <p>Nested cards get a raised surface color.</p> <layout-card> <strong>Nested Card</strong> </layout-card> </layout-stack></layout-card>
<layout-card data-variant="outlined"> <layout-stack data-layout-gap="m" data-layout-align="center"> <user-avatar data-size="xl"> <img src="avatar.jpg" alt="Jane Doe" /> </user-avatar> <layout-stack data-layout-gap="xs" data-layout-align="center"> <strong>Jane Doe</strong> <small>Product Designer</small> </layout-stack> <layout-cluster data-layout-gap="xs"> <layout-badge>UX</layout-badge> <layout-badge>UI</layout-badge> <layout-badge>Figma</layout-badge> </layout-cluster> </layout-stack></layout-card>
In grid mode, the card uses container-type: inline-size and automatically adjusts padding and typography when placed in narrow containers (under 300px). Headings shrink and footer actions stack vertically.
header, section, footer) for proper document structurearticle if the card represents standalone content<layout-stack> — Vertical stacking layout<layout-grid> — Auto-fit grid layout<layout-cluster> — Horizontal grouping with wrapping<layout-badge> — Badge/tag component<user-avatar> — Avatar display component