Skip to content

@lakea/ui

@lakea/ui provides React components for building scientific visualization interfaces:

  • Charts — Scatter plots, histograms, HR diagrams
packages/ui/src/
├── charts/
│ └── ScatterPlot.tsx
└── index.ts
  • @lakea/core — Types for data points and celestial objects
  • @lakea/design-system — Design tokens for styling
  1. Use @lakea/core types — All props use shared type definitions
  2. Use design-system tokens — Styling via @lakea/design-system/tokens, not Tailwind directly
  3. Headless where possible — Logic separated from presentation
  4. Accessible — ARIA labels, keyboard navigation
  5. Responsive — Works on mobile and desktop

WCAG 2.1 AA compliance for all interactive components.

RequirementImplementation
Color contrast4.5:1 minimum for text
Keyboard navigationAll interactive elements focusable
ARIA labelsIcons and charts have descriptive labels
Focus indicatorsVisible focus rings on all controls
  • Provide aria-label on SVG container
  • Include text alternatives for data points
  • Ensure tooltip content is accessible
  • Support keyboard navigation for data points

Components use inline styles with design-system tokens:

import { colors, radius, shadows } from '@lakea/design-system/tokens';
const style = {
backgroundColor: colors.slate[800],
borderRadius: radius.lg,
boxShadow: shadows.md,
};

See CSS Architecture for details on the styling rules.

  • Histogram — Distribution visualization
  • HRDiagram — Hertzsprung-Russell diagram
  • HubbleDiagram — Redshift vs distance