Vanilla Breeze v0.7.4

Vanilla Breeze v0.7.4 released

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…

Read the release notes

Dashboard

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.

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.

Charts Dashboard

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.

Data Table Dashboard

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.

No extra CSS is needed. A button whose only child is an <icon-wc> and which carries an aria-label is squared automatically.

Configuration

Dashboard patterns use these layout attributes and components:

Element Attribute Values Description
data-layout="grid" data-layout-min CSS length (e.g. 200px) Minimum column width before wrapping
data-layout="grid" data-layout-gap xs s m l xl Gap between grid items
data-layout="cluster" data-layout-justify start center end between Horizontal distribution
data-layout="cluster" data-layout-align start center end Vertical alignment
data-layout="cluster" data-layout-gap xs s m l xl Gap between items
data-layout="stack" data-layout-gap xs s m l xl 2xl Vertical spacing
layout-card data-padding none s m l xl Card padding
layout-card data-variant elevated outlined ghost Card style
layout-badge data-color success warning error info primary Badge color
layout-badge data-variant subtle outlined Badge style
layout-badge data-size sm lg Badge size
user-avatar data-size xs sm md lg xl Avatar size
score-card trend up down flat Colours the change line
chart-wc data-type line area bar column pie ring Chart type

Usage Notes

  • 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

Related

App Shells

Application shell layouts with navigation

Stats

Stat card patterns and change indicators

Card

Card component with padding and variant options

Badge

Status badges with semantic colors

User Avatar

Avatar component with fallback initials

Icon

SVG icon component with size variants

Score Card

KPI tile with value, change and sparkline slots

Chart

SVG charts from JSON or a table

↑