Honeycomb

Theming

Customize Honeycomb components with CSS variables and Tailwind CSS.

CSS Variables Required

Honeycomb uses CSS variables with --hive-* prefix. You must define these in your globals.css for components to work correctly.

CSS Files

The package exports 3 CSS files for different use cases:

FileContentsWhen to use
styles.cssCSS vars + components + Tailwind utilities + themeQuick start — all-in-one, no Tailwind needed
base.cssCSS vars + component styles onlyMinimal CSS without Tailwind utilities
theme.css@theme inline tokens onlyAdd hive-* classes to your own Tailwind project

CSS Variables Reference

Complete list of CSS variables used by Honeycomb components. All values are in HSL format (H S% L%).

VariableLightDarkDescription
Brand
--hive-red350 82% 48%350 82% 48%Brand primary color
--hive-dark0 0% 10%0 0% 10%Brand dark color
Layout
--hive-background0 0% 100%0 0% 7%Page background
--hive-foreground0 0% 9%0 0% 95%Primary text color
--hive-border0 0% 90%0 0% 20%Border color
--hive-ring350 82% 48%350 82% 48%Focus ring color
Card
--hive-card0 0% 100%0 0% 10%Card background
--hive-card-foreground0 0% 9%0 0% 95%Card text color
Popover
--hive-popover0 0% 100%0 0% 10%Popover background
--hive-popover-foreground0 0% 9%0 0% 95%Popover text color
Muted
--hive-muted0 0% 96%0 0% 15%Muted background
--hive-muted-foreground0 0% 45%0 0% 65%Muted text color
Status
--hive-success142 76% 36%142 71% 45%Success state (connected, healthy)
--hive-warning38 92% 50%48 96% 53%Warning state (connecting, reconnecting)
--hive-destructive0 84% 60%0 63% 31%Destructive state (error, disconnected)
--hive-destructive-foreground0 0% 100%0 0% 95%Destructive text color

Dark Mode

Light

Card

Description

Dark

Card

Description

CSS Variables

:root {
  /* Brand */
  --hive-red: 350 82% 48%;
  --hive-dark: 0 0% 10%;

  /* Layout */
  --hive-background: 0 0% 100%;
  --hive-foreground: 0 0% 9%;
  --hive-border: 0 0% 90%;
  --hive-ring: 350 82% 48%;

  /* Card */
  --hive-card: 0 0% 100%;
  --hive-card-foreground: 0 0% 9%;

  /* Popover */
  --hive-popover: 0 0% 100%;
  --hive-popover-foreground: 0 0% 9%;

  /* Muted */
  --hive-muted: 0 0% 96%;
  --hive-muted-foreground: 0 0% 45%;

  /* Status */
  --hive-success: 142 76% 36%;
  --hive-warning: 38 92% 50%;
  --hive-destructive: 0 84% 60%;
  --hive-destructive-foreground: 0 0% 100%;
}

.dark {
  /* Layout */
  --hive-background: 0 0% 7%;
  --hive-foreground: 0 0% 95%;
  --hive-border: 0 0% 20%;

  /* Card */
  --hive-card: 0 0% 10%;
  --hive-card-foreground: 0 0% 95%;

  /* Popover */
  --hive-popover: 0 0% 10%;
  --hive-popover-foreground: 0 0% 95%;

  /* Muted */
  --hive-muted: 0 0% 15%;
  --hive-muted-foreground: 0 0% 65%;

  /* Status */
  --hive-success: 142 71% 45%;
  --hive-warning: 48 96% 53%;
  --hive-destructive: 0 63% 31%;
  --hive-destructive-foreground: 0 0% 95%;
}

Solid.js CSS Setup

If you use Tailwind CSS 4 in your Solid.js project, create an app.css with the following content:

/* app.css — Solid.js projects with Tailwind CSS 4 */
@import "tailwindcss";
@import "@hiveio/honeycomb-solid/theme.css";

@theme inline {
  --color-background: hsl(var(--hive-background));
  --color-foreground: hsl(var(--hive-foreground));
  --color-border: hsl(var(--hive-border));
  --color-muted: hsl(var(--hive-muted));
  --color-muted-foreground: hsl(var(--hive-muted-foreground));
  --color-card: hsl(var(--hive-card));
  --color-card-foreground: hsl(var(--hive-card-foreground));
}

Tailwind CSS 4 Theme

/* Import in your app.css alongside tailwindcss */
@import "tailwindcss";
@import "@hiveio/honeycomb-solid/theme.css";

/* Optional: map hive vars to Tailwind semantic colors */
@theme inline {
  --color-background: hsl(var(--hive-background));
  --color-foreground: hsl(var(--hive-foreground));
  --color-border: hsl(var(--hive-border));
  --color-muted: hsl(var(--hive-muted));
  --color-muted-foreground: hsl(var(--hive-muted-foreground));
  --color-card: hsl(var(--hive-card));
  --color-card-foreground: hsl(var(--hive-card-foreground));
}

Usage Examples

How to use Honeycomb color variables in your components.

// Layout colors - auto adapt to light/dark mode
<div class="bg-hive-background text-hive-foreground border-hive-border">
  <p class="text-hive-muted-foreground">Muted text</p>
</div>

// Card component
<div class="bg-hive-card text-hive-card-foreground border-hive-border border rounded-lg p-4">
  Card content
</div>

// Status colors
<div class="bg-hive-success/10 text-hive-success">Connected</div>
<div class="bg-hive-warning/10 text-hive-warning">Connecting...</div>
<div class="bg-hive-destructive/10 text-hive-destructive">Error</div>

// Brand colors
<button class="bg-hive-red text-white hover:bg-hive-red/90">
  Vote on Hive
</button>

Customization

Override any variable in your application to customize the theme.

// In your app's globals.css, override any variable:
:root {
  --hive-red: 220 90% 56%; /* Blue instead of red */
  --hive-success: 160 80% 45%; /* Custom green */
}

.dark {
  --hive-background: 222 47% 11%; /* Darker background */
  --hive-card: 217 33% 17%; /* Slate card background */
}

Component Variables

Which components use which CSS variables.

ComponentVariables Used
ApiTracker--hive-card--hive-border--hive-foreground--hive-muted--hive-popover--hive-success--hive-warning--hive-destructive
HooksAPI Tracker