Design System for the Wattlink Family of Applications
Our color system uses CSS custom properties for easy theming and consistency.
Our typography scale uses CSS custom properties for consistent sizing.
Small Text (1rem)
Extra Small Text (0.875rem)
Double Extra Small Text (0.75rem)
Buttons come in various styles and sizes to suit different use cases.
<!-- Default Button -->
<button class="Button Button--primary">Click Me</button>
<!-- Outlined Button -->
<button class="Button Button--outlined Button--primary">Outlined</button>
<!-- Small Button -->
<button class="Button Button--primary Button--small">Small</button>
<!-- Small Outlined Button -->
<button class="Button Button--outlined Button--success Button--small">Small Outlined</button>
Badges are used to highlight status, counts, or labels.
<span class="Badge Badge--success">Active</span>
<span class="Badge Badge--warning Badge--pill">Pending</span>
Alerts provide contextual feedback messages for typical user actions.
<div class="Alert Alert--success">
<strong>Success!</strong> Operation completed.
</div>
Cards are flexible content containers with multiple variants.
This is a basic card component with a title and content. Cards are great for organizing related information and actions.
<div class="Card">
<div class="Card__title">Card Title</div>
<p>Card content goes here.</p>
</div>
Tables for displaying tabular data with various states and styles.
| Name | Role | Status | |
|---|---|---|---|
| John Doe | john@example.com | Admin | Active |
| Jane Smith | jane@example.com | User | Active |
| Bob Johnson | bob@example.com | User | Pending |
<table class="Table">
<thead>
<tr>
<th>Header 1</th>
<th>Header 2</th>
</tr>
</thead>
<tbody>
<tr>
<td>Data 1</td>
<td>Data 2</td>
</tr>
</tbody>
</table>
All colors and sizes are defined as CSS custom properties for easy theming.
--brand-primary
--brand-secondary
--brand-accent
--brand-dark
--semantic-success
--semantic-warning
--semantic-danger
--semantic-info
--fs-xxl: 3.5rem
--fs-xl: 2.75rem
--fs-lg: 1.75rem
--fs-md: 1.25rem
--fs-sm: 1rem
--fs-xs: 0.875rem
--fs-xxs: 0.75rem
All components follow BEM naming convention for consistency.
.Button - Button component.Badge - Badge component.Alert - Alert component.Card - Card component.Table - Table component.Form - Form component.Modal - Modal component.Nav - Navigation component.Button--primary
.Button--secondary
.Button--outlined
.Button--small
.Button--large
.Button--rounded
.Badge--success
.Badge--warning
.Badge--pill
.Badge--small
Form components for dark-themed interfaces with floating labels, validation, and specialized controls.
<div class="Form">
<div class="Form__group">
<label class="Form__label Form__label--required">Name</label>
<input type="text" class="Form__input" placeholder="...">
</div>
<div class="Form__granularity-buttons">
<label class="Form__granularity-btn active">Daily</label>
<label class="Form__granularity-btn">Monthly</label>
</div>
</div>
Modal dialogs for confirmations, forms, and payment details. Shown inline for preview.
Tab navigation for switching between views, with primary and secondary styles.
Tab content area. The active tab is highlighted with a bottom border.
<div class="Tabs">
<nav class="nav-tabs">
<a class="nav-link active">Tab 1</a>
<a class="nav-link">Tab 2</a>
</nav>
<div class="Tabs__content">...</div>
</div>
Horizontal and vertical navigation patterns for application menus.
Pagination controls for navigating through data lists and tables.
Icon containers with size variants and semantic color backgrounds.
<div class="Icon Icon--circular Icon--medium Icon--success">
<i class="bi bi-check"></i>
</div>
Metric display cards used in dashboards to show key statistics.
Outlined buttons indicating process states with semantic colors.
<button class="StatusButton StatusButton--success">
<i class="bi bi-check-circle"></i> Success
</button>
Content containers with items, icons, and actions. Multiple density levels.
List components for partners, invoices, metering points, and data items with status indicators, badges, actions, and advanced interaction patterns.
--admin — System administrator--accountant — Finance & billing--sales — Sales representative--superadmin — Super administrator--user — Standard user--supplier — Energy supplier--customer — Energy customer--combined — Supplier + customer (gradient)--confirmed — Confirmed / paid--pending — Awaiting actionAdd Listing--responsive to stack content vertically on mobile. Actions become a full-width toolbar. Resize your browser to see the effect.
Combine Listing--compact with Listing--responsive for a space-efficient mobile layout. Content stays inline on one row with the name truncated via ellipsis, while actions form a compact footer. Resize to see.
Use Listing__info-primary and Listing__info-secondary for two-line item descriptions with emphasis hierarchy.
<!-- Full responsive listing with actions -->
<div class="Listing Listing--responsive">
<div class="Listing__item">
<div class="Listing__content Listing__content--single-line">
<div class="Listing__main">
<div class="Listing__status Listing__status--supplier">S</div>
<div class="Listing__info">
<div class="Listing__name">Item Name</div>
</div>
</div>
<div class="Listing__amount">1,234 kWh</div>
<div class="Listing__actions">
<a class="Listing__action Listing__action--primary">View</a>
<a class="Listing__action Listing__action--secondary">Edit</a>
</div>
</div>
</div>
</div>
<!-- Compact + responsive combo -->
<div class="Listing Listing--compact Listing--responsive">
...
</div>
Extended table features with row states, cell formatting, inline badges, and sortable headers.
| Name ↑ | Type | Status | Production | Balance |
|---|---|---|---|---|
| Community Alpha | Supplier | Active | +1,245 kWh | 24,500 CZK |
| Community Beta | Customer | Active | 890 kWh | 12,300 CZK |
| Community Gamma | Supplier | Pending | 0 kWh | -3,200 CZK |
| Community Delta | Customer | Error | 0 kWh | -1,800 CZK |
| Total | 2,135 kWh | 31,800 CZK | ||
| Date | Code | Amount | Actions |
|---|---|---|---|
| 2026-02-15 | INV-0042 |
4,520 CZK | |
| 2026-02-10 | INV-0041 |
2,180 CZK | |
| 2026-02-01 | INV-0040 |
8,900 CZK |
Add Table--responsive to convert rows into stacked cards on mobile. Each <td> uses data-label to show the column header. Resize your browser to see the effect.
| Name | Type | Status | Production | Actions |
|---|---|---|---|---|
| Solar Park Moravsko | Supplier | Active | +1,245 kWh | |
| Bytový dům Vinohrady | Customer | Pending | 890 kWh | |
| Komunita Zábřeh | Supplier | Error | 0 kWh |
<!-- Standard table with row states -->
<table class="Table Table--small Table--hoverable">
<thead>
<tr class="Table__header">
<th class="Table__header--sortable">Name</th>
</tr>
</thead>
<tbody>
<tr class="Table__row Table__row--success">
<td class="Table__cell--positive">+100</td>
</tr>
</tbody>
</table>
<!-- Responsive table (cards on mobile) -->
<table class="Table Table--responsive">
<thead>
<tr class="Table__header">
<th>Name</th>
<th>Status</th>
<th>Amount</th>
<th class="Table__cell--actions">Actions</th>
</tr>
</thead>
<tbody>
<tr class="Table__row">
<td data-label="Name">Item Name</td>
<td data-label="Status">Active</td>
<td data-label="Amount">1,234 CZK</td>
<td class="Table__cell--actions">
<button class="Button Button--primary">View</button>
</td>
</tr>
</tbody>
</table>
Card variants with metric displays, accent backgrounds, and combined content.
Card with solid accent background color for emphasis.
Card with transparent accent background for subtle highlighting.
No data available for the selected period.
Sidebar filter panels for data views with toggles, groups, and search.
Real-world layout combinations showing how components work together.
| Partner | Invoice | Amount | Status |
|---|---|---|---|
| Community Delta | INV-0038 |
-1,800 CZK | Overdue |
| Community Epsilon | INV-0039 |
3,200 CZK | Pending |
A full dashboard page layout combining Toolbar, KPI cards, tabs, data table, and pagination into a realistic energy management view.
| Metering Point ↑ | Type | Community | Status | Production | Consumption | Balance |
|---|---|---|---|---|---|---|
| CZ-MP-001-SOLAR | Supplier | Solar Community Prague | Active | +1,245 kWh | 312 kWh | +8,420 CZK |
| CZ-MP-002-ROOF | Supplier | Rooftop Collective Brno | Active | +987 kWh | 154 kWh | +5,930 CZK |
| CZ-MP-003-WIND | Customer | Wind Farm Ostrava | Pending | 0 kWh | 1,890 kWh | -3,200 CZK |
| CZ-MP-004-BATT | Customer | Solar Community Prague | Active | 0 kWh | 360 kWh | 2,100 CZK |
| CZ-MP-005-GRID | Grid | Rooftop Collective Brno | Error | 0 kWh | 0 kWh | -1,800 CZK |
| Total (5 metering points) | 2,232 kWh | 2,716 kWh | 11,450 CZK | |||
A settings page layout combining navigation, avatar, form inputs, checkbox preferences, and action buttons.
A step-by-step wizard for onboarding new energy community members, showing step indicators, progress, and form content.
Register the solar panels and other generation assets for your energy community.
Progress bars visualize completion, data import status, and energy usage levels.
<div class="ProgressBar">
<div class="ProgressBar__fill ProgressBar__fill--success" style="width: 72%;">
<span class="ProgressBar__label">72%</span>
</div>
</div>
<!-- Striped variant -->
<div class="ProgressBar">
<div class="ProgressBar__fill ProgressBar__fill--warning ProgressBar__fill--striped"
style="width: 45%;"></div>
</div>
Skeleton placeholders indicate loading states while content is being fetched.
<!-- Text lines -->
<div class="Skeleton Skeleton--text" style="width: 90%;"></div>
<div class="Skeleton Skeleton--text" style="width: 75%;"></div>
<!-- Circle (avatar placeholder) -->
<div class="Skeleton Skeleton--circle" style="width: 3rem; height: 3rem;"></div>
<!-- Rectangle (card placeholder) -->
<div class="Skeleton Skeleton--rect" style="width: 100%; height: 120px;"></div>
Specialized cards for key performance indicators with trend arrows and compact layouts.
<div class="KPICard">
<div class="KPICard__label">Monthly Revenue</div>
<div class="KPICard__value">124,500 CZK</div>
<div class="KPICard__trend KPICard__trend--up">▲ +12%</div>
</div>
<!-- Compact variant -->
<div class="KPICard KPICard--compact">...</div>
<!-- With sparkline area -->
<div class="KPICard">
...
<div class="KPICard__sparkline">
<svg viewBox="0 0 120 32">...</svg>
</div>
</div>
Toolbars group actions, search, and controls in a horizontal bar above content areas.
Content for the selected tab is displayed here. The toolbar provides global actions while tabs switch between data views.
<div class="Toolbar">
<div class="Toolbar__group">
<button class="Button Button--primary Button--small">Add</button>
<button class="Button Button--outlined Button--primary Button--small">Refresh</button>
</div>
<div class="Toolbar__separator"></div>
<div class="Toolbar__group">
<button class="Button Button--secondary Button--small">Export</button>
</div>
</div>
Components support both dark (default) and light variants. Theming is driven by CSS custom properties defined on :root, making it straightforward to override brand colors or switch palettes per application.
Default dark background with subtle border. Ideal for dashboards and data-heavy views.
Solid accent background for emphasis and featured sections. High visual weight.
Translucent accent background for subtle highlighting without overpowering adjacent content.
/* Override brand colors per-application */
:root {
--theme-brand-primary: hsla(33, 100%, 61%, 1); /* Wattlink orange */
--theme-brand-secondary: hsla(169, 47%, 49%, 1); /* Wattlink teal */
--theme-brand-dark: hsla(240, 75%, 13%, 1); /* Deep navy */
--theme-brand-accent: hsla(240, 93%, 29%, 1); /* Royal blue */
}
/* All components inherit from these properties automatically.
Switch .Box--light for a white-background variant. */
Pricing card patterns for energy service tiers with feature comparison and call-to-action buttons.
Chronological activity feed for energy community events, combining timeline markers with badges and avatars.
INV-2026-0089 paid by Bytovy dum Karlin.
Amount: 18,750 CZK
Paid
User profile patterns combining avatars, cards, badges, and listing components for team management views.
Notification panel patterns with categorized items, read/unread states, and quick actions.
Full-page month calendar with multi-day event spanning, lane stacking for overlapping events, and inline actions. Server-rendered, no JavaScript required.
Toggle buttons for filtering event types on the calendar. Each filter has a colored dot indicator.
Events spanning multiple weeks get split with visual continuation indicators (rounded corners removed on the continuation side).
<%= calendar_month(
date: @date,
events: @events,
prev_path: my_path(date: @date.prev_month),
next_path: my_path(date: @date.next_month)
) do |event| %>
<span class="Calendar__event-title"><%= event.title %></span>
<div class="Calendar__event-actions">
<%= link_to icon("eye"), event, class: "Calendar__event-action" %>
<%= link_to icon("pencil"), edit_event_path(event), class: "Calendar__event-action" %>
</div>
<% end %>
Events must respond to:
.starts_on (Date)
.ends_on (Date)
.color (optional: "primary" | "secondary" | "accent" | "success" | "warning" | "danger" | "info" | "purple" | "dark")
Drag-and-drop file upload area with states for empty, has-file, and current file display.
Toggle buttons for selecting time period ranges. Active state highlights the selected period.
<div class="PeriodRange__buttons">
<button class="PeriodRange__btn">Day</button>
<button class="PeriodRange__btn active">
<span class="PeriodRange__check">✓</span>
Week
</button>
<button class="PeriodRange__btn">Month</button>
</div>
All components follow BEM naming convention for consistency.
.Button - Buttons & actions.Badge - Status labels.Alert - Feedback messages.Card - Content containers.Table - Data tables.Form - Form elements.Modal - Dialog overlays.Tabs - Tab navigation.Nav - App navigation.Pagination - Page controls.Icon - Icon containers.StatCard - Metric cards.StatusButton - State buttons.Box - Content boxes.Listing - List items.FilterPanel - Filter sidebar.ProgressBar - Progress indicators.Skeleton - Loading placeholders.KPICard - KPI dashboard cards.Toolbar - Action toolbars.Avatar - User avatars.PricingCard - Pricing tiers.Timeline - Activity feeds.Calendar - Month calendar.CalendarFilter - Calendar event filters.FileUpload - File upload area.PeriodRange - Period selectors.Button--primary / --secondary / --success / --danger / --warning / --info
.Button--outlined / --small / --large / --rounded
.Badge--success / --warning / --danger / --pill / --small / --large
.Table--transparent / --small / --hoverable / --collapsible
.Table__row--success / --warning / --danger / --highlighted / --grouped
.Table__cell--numeric / --positive / --negative / --code
.Card--accent-bg / --accent-bg-transparent
.Card__metric / __metric-icon / __metric-label / __metric-value
.StatCard--compact / --border-success / --border-warning / --border-danger
.StatusButton--pending / --running / --success / --error
.Icon--circular / --small / --medium / --large / --xlarge
.Icon--production / --consumption / --sharing / --success / --warning
.Box--compact / --supercompact / --light / --accent-bg
.Listing--compact / --responsive / .Listing__action--primary / --secondary / --danger
.Listing__badge--success / --warning / --info / --secondary
.Nav--vertical / .FilterPanel__toggle / .FilterPanel__group
.ProgressBar__fill--success / --warning / --danger / --info / --primary
.ProgressBar__fill--striped / .ProgressBar__label
.Skeleton--text / --circle / --rect
.KPICard--compact / .KPICard__trend--up / --down
.KPICard__sparkline
.Toolbar__group / .Toolbar__separator
.PricingCard / .PricingCard--featured
.Timeline / .Timeline__item / .Timeline__marker
.Avatar / .Avatar--small / --medium / --large / --xlarge
.Calendar / .Calendar__header / __title / __nav / __nav--placeholder
.Calendar__day--outside / --today / --weekend
.Calendar__event--primary / --secondary / --accent / --success / --warning / --danger / --info / --purple / --dark
.Calendar__event--continues-before / --continues-after
.Calendar__event-title / .Calendar__event-actions / .Calendar__event-action
.CalendarFilter__btn--success / --purple / --danger / --dark / --info
.CalendarFilter__dot
.Listing__info-primary / .Listing__info-secondary
.FileUpload__container / --has-file / --drag-over
.FileUpload__upload-button / __upload-icon / __upload-text / __upload-help
.FileUpload__file-info / __file-icon / __file-name / __file-actions
.FileUpload__current-file / __current-label / __current-name / __download-link
.PeriodRange__buttons / .PeriodRange__btn / .PeriodRange__check