Dark Mode
DocsAPIChangelogBlog
Back
Dark Interface Design

Built for developers
who ship at night.

Elegant dark interfaces with layered surface hierarchy, precise contrast ratios, and blue-accented interactions optimized for professional tools.

99.9%
Uptime SLA
+0.1%
12.4K
Active Users
+18%
45ms
Avg Response
-12ms
2.1TB
Data Stored
+340GB

Component Library

Every component follows the dark-mode physics: inset glow buttons, illumination-on-hover cards, and visible focus rings with ring-offset-slate-900.

Buttons

Variants

Sizes

With Icon

Cards

Developer Dashboard

Real-time metrics and system monitoring with comfortable contrast for extended sessions.

Performance First

Optimized rendering pipeline with sub-50ms response times across all interactions.

Secure by Default

End-to-end encryption and role-based access control built into every layer.

Form Elements

Toggles

Dark Mode
Notifications
Auto-save

Select

Status Badges

OnlineDegradedIncident

Color System

Surface hierarchy through luminance steps, not hue. Blue anchors attention; semantic colors communicate state.

Surface Hierarchy

Base

#0f172a

Page background

Surface

#1e293b

Card / panel

Elevated

#334155

Tooltip / modal

Border

#334155

Dividers

Semantic Colors

Blue

#3b82f6

Primary accent

Green

#22c55e

Success

Amber

#f59e0b

Warning

Red

#ef4444

Danger / error

Text Hierarchy

Primary text
#f1f5f9Headings, labels
Secondary text
#cbd5e1Body copy
Muted text
#94a3b8Captions, hints
Disabled text
#64748bPlaceholders

Design Rules

The dark-mode physics model: illumination on hover, inset glow buttons, tactile press, visible focus.

Do

  • Deep backgrounds: bg-slate-900 / bg-[#0f172a]
  • Semi-transparent cards: bg-slate-800/50, hover:bg-slate-800
  • Low-contrast borders: border-slate-700, hover:border-slate-500
  • Text hierarchy: text-slate-100 primary, text-slate-400 secondary
  • Saturated accents: blue-500, green-500
  • Inset top-edge glow on buttons: shadow-[inset_0_1px_0_rgba(255,255,255,0.15)]
  • Tactile press: active:scale-[0.98] on every button
  • Visible focus: focus:ring-2 focus:ring-offset-2 focus:ring-offset-slate-900
  • Card elevation: hover:-translate-y-0.5 + deep dark shadow

Don't

  • Pure white text (text-white is too harsh on slate-900)
  • High-contrast borders — they break the low-light illusion
  • Pure black background (#000000 looks flat and lifeless)
  • Dark text on dark surfaces — always check contrast ratio
  • Too many accent colors in one view
  • Light-colored shadows — invisible on dark backgrounds
  • Buttons without active:scale-[0.98] — no tactile feedback
  • focus:ring without ring-offset-slate-900 — ring merges with bg

Typography

Light text on dark — never pure white. Hierarchy through weight and luminance, not size alone.

Type Scale

Display — text-5xl / font-bold

Dark Mode

Heading 1 — text-3xl / font-semibold

System Design

Heading 2 — text-xl / font-semibold

Component Library

Body — text-base / text-slate-300

Comfortable reading in low-light environments requires careful contrast ratios and appropriate line height.

Caption — text-sm / text-slate-400

Secondary information and metadata labels

middleware.tsTypeScript
// Authentication middleware
import { verify } from "@/lib/auth";
 
export async function middleware(req: Request) {
const token = req.headers.get("authorization");
 
if (!token) {
return new Response("Unauthorized", { status: 401 });
}
 
const payload = await verify(token.split(" ")[1]);
return payload ? next(req) : forbidden();
}

Inline code

Use focus:ring-offset-slate-900 to ensure the focus ring is visible against dark surfaces. Pair with active:scale-[0.98] for tactile feedback.

Navigation Patterns

Tabs for in-page context switching. Sidebar panels for app-level navigation. Both use blue-500 as the active indicator.

Tab Navigation

System Overview

All services operational. Last check 42 seconds ago.

All systems normal

Sidebar Navigation

Workspace

Overview

Monitor your system status, recent deployments, and team activity at a glance.

Alerts

Semantic color overlays at 10% opacity preserve readability on dark surfaces. Icons anchor the status at a glance.

Information

A new software update is available. Restart to apply changes.

Success

Deployment complete — all 12 services are running normally.

Warning

CPU usage at 87% — consider scaling the compute tier.

Error

Database connection failed. Check credentials and network access.

Progress & Metrics

Progress bars use the semantic color vocabulary. Warning states transition to amber automatically.

Storage Used75%
Memory45%
CPU Usage88%
Disk I/O32%
Dark Mode

Elegant dark interface design system. Built for developers who care about the details — contrast, glow physics, and tactile feedback.

Resources

  • Documentation
  • Component API
  • Design Tokens
  • Changelog

StyleKit

  • All Styles
  • Submit Style
  • GitHub
  • Community

StyleKit — Dark Mode showcase. Designed for low-light professionals.

Full DocsBrowse all styles