Something went wrong. Try again.
[READ-ONLY] Mirror of https://github.com/openstatusHQ/openstatus. 🫖 Status page with uptime monitoring & API monitoring as code 🫖 openstatus.dev
Something went wrong. Try again.
22 files
README.md
# Status Blocks Components
A sophisticated composition-based architecture for displaying system status information. This collection provides flexible, accessible, and beautifully designed components for building status pages, incident reports, and uptime dashboards.
## Overview
The blocks components are built on a **composition pattern** where simple primitives can be combined to create complex status displays. Rather than monolithic components with dozens of props, you compose smaller focused components together to achieve your desired layout and behavior.
### Key Features
- **Composition-First**: Build complex UIs from simple, focused primitives
- **Type-Safe**: Full TypeScript support with discriminated unions
- **Accessible**: ARIA roles, keyboard navigation, screen reader support
- **Themeable**: CSS variables for colors, dark mode support
- **Responsive**: Mobile-first design with adaptive layouts
- **Interactive**: Keyboard navigation, hover cards, collapsible groups
- **Localizable**: Optional i18n provider for translated labels and locale-aware date formatters; sensible English defaults out of the box
## Architecture
### Design Principles
1. **Separation of Concerns**: Each component has a single, clear purpose
2. **Data Attributes**: Components use `data-*` attributes for status-based styling
3. **CSS Group Patterns**: Parent components establish context via `group` classes
4. **Headless Hooks**: Complex interactions separated from presentation (e.g., `useStatusBar`)
5. **Composition over Configuration**: Combine components rather than configure via props
### Component Layers
```
┌──────────────────────────────────────────────────────────┐
│ Layout Components (Status, StatusComponent, StatusEvent) │
│ └─ Establish context via data-variant/data-status │
├──────────────────────────────────────────────────────────┤
│ Display Components (StatusIcon, StatusMessage, etc.) │
│ └─ Respond to parent context via CSS selectors │
├──────────────────────────────────────────────────────…