v1.0 — CSS only, zero dependencies

A minimal CSS framework for modern interfaces.

PocketCSS gives you a clean design system out of the box — tokens, components, and themes — without any build tools, JavaScript, or opinionated markup.

Get Started GitHub npm install pocketcss

Getting Started

Installation

Drop a single CSS file into your project. No build step, no config, no JavaScript required.

Via CDN

<link rel="stylesheet" href="https://unpkg.com/pocketcss/pocket.css">

Via npm

npm install pocketcss

/* In your CSS or JS entry */
import 'pocketcss/pocket.css'

Manual download

Download pocket.css and place it in your project, then reference it with a standard <link> tag. That's it.

Themes

Theme System

PocketCSS ships with four themes. Light is the default — no class needed. To switch, add a single class to <body>.

Theme Class Description
Light — (default) Clean off-white, no class needed
Dark pc-dark-theme Deep charcoal background
Sepia pc-sepia-theme Warm paper tone
Contrast pc-contrast-theme High contrast, WCAG AA
<!-- Light (default, no class) -->
<body>

<!-- Dark -->
<body class="pc-dark-theme">

<!-- Sepia -->
<body class="pc-sepia-theme">

<!-- High Contrast -->
<body class="pc-contrast-theme">

Design Tokens

Colors

All colors are CSS custom properties defined on :root. They automatically update when a theme class is applied to body.

Background
--pc-color-bg
Surface
--pc-color-surface
Border
--pc-color-border
Text
--pc-color-text
Text Muted
--pc-color-text-muted
Accent
--pc-color-accent
Success
--pc-color-success
Warning
--pc-color-warning
Danger
--pc-color-danger

Spacing

8 spacing steps based on a 4px base unit.

Token Value Pixels
--pc-space-1 .25rem 4px
--pc-space-2 .5rem 8px
--pc-space-3 .75rem 12px
--pc-space-4 1rem 16px
--pc-space-5 1.5rem 24px
--pc-space-6 2rem 32px
--pc-space-8 3rem 48px

Border Radius

sm
base
lg
pill

Typography

Headings & Text

Heading H1 — 2.5rem

Heading H2 — 1.75rem

Heading H3 — 1.25rem

Section Title — uppercase label

Regular paragraph text. Bold weight, italic style, and underlined text are all supported inline.

Muted text using .pc-text-muted for secondary content and captions.

<h1 class="pc-h1">Heading H1</h1>
<h2 class="pc-h2">Heading H2</h2>
<h3 class="pc-h3">Heading H3</h3>
<p class="pc-title">Section Label</p>
<p class="pc-text">Paragraph text</p>
<p class="pc-text pc-text-muted">Muted text</p>

Blockquote

"Simplicity is the ultimate sophistication." — Leonardo da Vinci
<blockquote class="pc-blockquote">
  "Your quote here."
</blockquote>

Inline Code

Use .pc-code for inline code snippets like const x = 42 within body text.

<code class="pc-code">const x = 42</code>

Components

Buttons

Variants

<button class="pc-btn pc-btn-primary">Primary</button>
<button class="pc-btn pc-btn-secondary">Secondary</button>
<button class="pc-btn pc-btn-outline">Outline</button>

Sizes

<button class="pc-btn pc-btn-primary pc-btn-sm">Small</button>
<button class="pc-btn pc-btn-primary">Default</button>
<button class="pc-btn pc-btn-primary pc-btn-lg">Large</button>

As anchor

<a href="#" class="pc-btn pc-btn-primary">Link Button</a>

Forms

<form class="pc-form">
  <div class="pc-form-group">
    <label class="pc-label">Full Name</label>
    <input type="text" class="pc-input" placeholder="Jane Doe">
  </div>
  <div class="pc-form-group">
    <label class="pc-label">Message</label>
    <textarea class="pc-textarea"></textarea>
  </div>
  <div class="pc-form-group">
    <label class="pc-label">Country</label>
    <select class="pc-select">...</select>
  </div>
  <div class="pc-form-check">
    <input type="checkbox" class="pc-checkbox">
    <label>I agree</label>
  </div>
</form>

Tables

# Component Version Status
1 Buttons 1.0.0 Stable
2 Forms 1.0.0 Stable
3 Modal — Planned
4 Tooltip — Deprecated
5 Tabs 0.9.1 Beta
<table class="pc-table">
  <thead class="pc-thead">
    <tr><th class="pc-th">Name</th></tr>
  </thead>
  <tbody class="pc-tbody">
    <tr class="pc-tr"><td class="pc-td">Value</td></tr>
  </tbody>
</table>

Badges

Success Warning Danger Info
<span class="pc-badge pc-badge-success">Success</span>
<span class="pc-badge pc-badge-warning">Warning</span>
<span class="pc-badge pc-badge-danger">Danger</span>
<span class="pc-badge pc-badge-info">Info</span>

Cards

Card image

Card with Image

A simple card component with an image, title, and body text.

Feature

Text-only Card

Cards work just as well without images — great for feature lists or content blocks.

Available
<div class="pc-card">
  <img src="..." class="pc-img-fluid">
  <div class="pc-card-body">
    <h4 class="pc-card-title">Title</h4>
    <p class="pc-card-text">Description text.</p>
  </div>
</div>

Lists

  • Zero dependencies — pure CSS
  • Four built-in themes with token system
  • Responsive out of the box
  • Accessible focus states on all interactive elements
<ul class="pc-list">
  <li class="pc-list-item">Item one</li>
  <li class="pc-list-item">Item two</li>
</ul>

Utilities

Utility Classes

Class Property
pc-text-muted color: --pc-color-text-muted
pc-text-accent color: --pc-color-accent
pc-text-center text-align: center
pc-text-right text-align: right
pc-d-flex display: flex
pc-d-none display: none
pc-items-center align-items: center
pc-justify-between justify-content: space-between
pc-flex-wrap flex-wrap: wrap
pc-gap-1 … pc-gap-4 gap: --pc-space-1 … 4
pc-mt-1 … pc-mt-5 margin-top: --pc-space-*
pc-mb-1 … pc-mb-4 margin-bottom: --pc-space-*
pc-p-4 … pc-p-6 padding: --pc-space-*
pc-rounded border-radius: --pc-radius
pc-rounded-lg border-radius: --pc-radius-lg
pc-rounded-pill border-radius: --pc-radius-pill
pc-shadow-sm box-shadow: --pc-shadow-sm
pc-shadow box-shadow: --pc-shadow
pc-shadow-lg box-shadow: --pc-shadow-lg
pc-w-full width: 100%
pc-sr-only visually hidden (accessibility)