0.7.4 gives the Ambient pack weather. A page names one feed URL on its own site, and the pack sets data-weather from it, uses its sunrise and sunset for dawn and dusk, and never shows a stale observation. Helpers for producing the feed from Open-Meteo are included. Ambient p…
Dashboard layouts with stat cards, charts, and data tables. Build comprehensive admin interfaces and analytics views.
Overview
Dashboard patterns combine multiple components to create data-rich interfaces. These layouts organize statistics, visualizations, and tabular data in a way that's easy to scan and understand.
Key features:
KPI tiles with <score-card>: title, value, change, sparkline and icon slots, coloured by trend
Charts with <chart-wc>, sized by a responsive grid
Native <table> styling inside <data-table>, with <layout-badge> for status and <user-avatar> for identity
Responsive grid layouts using data-layout-min for automatic column sizing
Consistent spacing and <layout-card>-based organization
Stats Grid Dashboard
A dashboard focused on key metrics displayed in <score-card> tiles. Each tile slots a title, a <data> value, a <small> change line, a sparkline and an icon; trend="up|down" colours the change, and wrapping the tile in a link makes it a drill-down.
dashboard-stats.html
<maindata-layout="center"data-layout-max="wide"data-layout-gap="xl"><!-- Page Header --><headerdata-layout="cluster"data-layout-justify="between"data-layout-align="center"><hgroup><h1>Dashboard</h1><p>Overview of your business metrics</p></hgroup><layout-clusterdata-layout-gap="s"><buttontype="button"class="button secondary"><icon-wcname="calendar"size="sm"></icon-wc> Last 30 days</button><buttontype="button"class="button"><icon-wcname="download"size="sm"></icon-wc> Export</button></layout-cluster></header><!-- Stats Grid --><layout-griddata-layout-gap="l"data-layout-min="m"><ahref="#revenue"><score-cardtrend="up"tone="success"><spanslot="title">Total Revenue</span><dataslot="value"value="45231">$45,231</data><smallslot="change"><datavalue="0.12">+12%</data> from last month</small><svgslot="sparkline"viewBox="0 0 100 30"preserveAspectRatio="none"role="img"aria-label="Revenue trend, increasing"><pathd="M 0 22 L 20 19 L 40 17 L 60 12 L 80 8 L 100 4"/><circlecx="100"cy="4"r="2"/></svg><icon-wcslot="icon"name="dollar-sign"size="md"></icon-wc></score-card></a><ahref="#tasks"><score-cardtrend="down"tone="warning"><spanslot="title">Tasks Completed</span><dataslot="value"value="0.89">89%</data><smallslot="change"><datavalue="-0.04">-4%</data> from last month</small><!-- sparkline… --><icon-wcslot="icon"name="check-circle"size="md"></icon-wc></score-card></a><!-- Additional score cards... --></layout-grid></main>
Sparkline and Drill-down Styles
<score-card> styles its own tile. The page supplies two small rules: the stroke of an inline SVG sparkline, coloured by the card's trend, and the link wrapper that makes a tile clickable. Swap the SVG for <chart-wc slot="sparkline" data-size="sparkline"> to drop the first rule.
An analytics layout: a row of <score-card> tiles above a responsive grid of <layout-card> panels, each holding a <chart-wc>. <chart-wc> ships in the separate charts bundle, so the page loads vanilla-breeze-charts.css and vanilla-breeze-charts.js.
A dashboard centered on tabular data with a filter bar, status badges via <layout-badge>, user avatars via <user-avatar>, and row actions. The native <table> sits in <data-table>, whose container query lets data-responsive="card" turn rows into cards in a narrow card.
KPI tiles:<score-card> lays out its slots and colours the change by trend; put the number in <data value> so the raw value stays machine-readable
Native tables: Vanilla Breeze styles <table> elements directly — no custom classes needed. Wrap the table in <data-table> and add data-responsive="card" to reflow rows on small screens, or use a [data-table-scroll] wrapper for horizontal scrolling.
Loading states: Show skeleton placeholders while data loads to prevent layout shift
Responsive layout: The grid automatically adjusts columns based on data-layout-min; test on mobile to ensure usability
Charts:<chart-wc> reads data-values JSON or a child <table>; another library can render into the same <layout-card> slot instead
Semantic colors: Use --color-success for positive trends, --color-error for negative
Empty states: Provide helpful empty states when no data is available
Accessibility: Ensure tables have proper scope attributes and buttons have aria-label
Real-time updates: Consider using subtle animations when stats update dynamically