Skip to content

Design System

room-ui uses a carefully crafted dark theme design system optimized for Deal Room and data-intensive applications.

Color Palette

Background Colors

TokenCSS VariableTailwind ClassUsage
Base--room-bg-basebg-room-bg-basePage backgrounds
Elevated--room-bg-elevatedbg-room-bg-elevatedCards, modals
Surface--room-bg-surfacebg-room-bg-surfaceInteractive surfaces
Hover--room-bg-hoverbg-room-bg-hoverHover states

Text Colors

TokenTailwind ClassUsage
Primarytext-room-text-primaryMain content
Secondarytext-room-text-secondarySupporting text
Mutedtext-room-text-mutedSubtle text
Disabledtext-room-text-disabledDisabled states

Accent Colors

TokenTailwind ClassUsage
Accentbg-room-accentPrimary actions, links
Accent Hoverhover:bg-room-accent-hoverHover states
Accent Mutedbg-room-accent-mutedSubtle accent backgrounds

Semantic Colors

TokenTailwind ClassUsage
Successbg-room-successSuccess states
Errorbg-room-errorError states
Warningbg-room-warningWarning states
Infobg-room-infoInformational states

Typography

Font Families

  • Sans: Geist Sans - Primary font for UI text
  • Mono: Geist Mono - Code and data display

Font Sizes

SizeClassUsage
xstext-xsLabels, badges
smtext-smSecondary text, descriptions
basetext-baseBody text
lgtext-lgSubheadings
xltext-xlSection titles
2xltext-2xlPage titles

Spacing

room-ui uses a consistent spacing scale:

TokenValueUsage
xs4pxTight spacing
sm8pxCompact spacing
md16pxDefault spacing
lg24pxComfortable spacing
xl32pxSection spacing
2xl48pxLarge gaps

Border Radius

TokenClassValue
smrounded-room-sm8px
defaultrounded-room12px
lgrounded-room-lg16px

Shadows

Components use subtle shadows for elevation:

css
/* Card shadow */
box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);

/* Modal shadow */
box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);

Using Design Tokens

In Components

tsx
import { Box, Text, Card } from 'room-ui';

function Example() {
  return (
    <Card>
      <Box padding="md" background="elevated">
        <Text color="primary">Primary text</Text>
        <Text color="secondary">Secondary text</Text>
      </Box>
    </Card>
  );
}

In Custom CSS

css
.custom-element {
  background: var(--room-bg-surface);
  color: var(--room-text-primary);
  border: 1px solid var(--room-border);
  border-radius: var(--room-radius);
}

With Tailwind

tsx
<div className="bg-room-bg-surface text-room-text-primary border border-room-border rounded-room">
  Custom styled content
</div>

Accessibility

All colors meet WCAG AA contrast requirements:

  • Text on backgrounds: 4.5:1 minimum
  • Large text on backgrounds: 3:1 minimum
  • Interactive elements: 3:1 minimum

Best Practices

  1. Use semantic colors for feedback states (success, error, warning)
  2. Maintain hierarchy with text color tokens (primary > secondary > muted)
  3. Use consistent spacing from the spacing scale
  4. Prefer components over custom styling when possible
  5. Test in dark mode - room-ui is designed for dark themes

Released under the MIT License.