Stoa is the AI Socratic design system, as one package. Tokens, a Tailwind v4 theme, and the React primitives behind aisocratic.org and its sibling apps — so every product reads as one family, and updating the design is a version bump.
The package name is @aisocratic/design; this revision is available from the
repository and is not yet published to npm. Build a portable archive locally:
git clone https://github.com/aisocratic/stoa.git
cd stoa
pnpm install --frozen-lockfile
pnpm build
pnpm pack --pack-destination /tmp
# In a consumer: pnpm add /tmp/aisocratic-design-0.2.0.tgzFor reproducible installs, keep the archive in the consumer's vendor/ directory
and install that relative path. See adopting.
/* app/globals.css — the whole file */
@import "tailwindcss";
@import "@aisocratic/design/tailwind.css";import { Section, PageHero, Button, cn } from "@aisocratic/design"
import { Dialog } from "@aisocratic/design/components/dialog"Status: 0.2. Extracted from a codebase where it has run in daily use. The API is small and the values are settled; expect additive change.
| Import | For | Contents |
|---|---|---|
@aisocratic/design/tailwind.css |
Next.js / Tailwind v4 apps | colour tokens in light and dark, the type scale, radii, font roles, page-shell, base layer, the dark variant |
@aisocratic/design/tokens.css |
static sites, Remotion, anything without Tailwind | the same custom properties, plain CSS |
@aisocratic/design |
React apps | cn, control variants, Section / SectionHeading / RuledHeading / PageHero, Button, Badge, Card, Input, Textarea, Table, Alert, Skeleton, Spinner, EmptyState, Collapsible, LogoMark, Wordmark, and the token objects |
@aisocratic/design/components/<name> |
React apps | everything with an optional peer: Dialog, Sheet, Select, Popover, Tooltip, Tabs, DropdownMenu, ScrollArea, Progress, Avatar, Checkbox, Switch, Label, Command, Sonner |
@aisocratic/design/tokens · tokens.json · native |
scripts, React Native, design tools | the typed source, its JSON, and an RN-shaped { colors, radii, type, fonts } |
- Nine sizes, one scale.
text-microtext-bodytext-leadtext-titletext-sectiontext-pagetext-displaytext-herotext-mega— a golden-ratio ladder anchored at 14px, the top six fluid. Never a stocktext-sm, nevertext-[Npx], neverleading-*beside a step. Two text styles on top:text-nav(the header navigation) andtext-eyebrow. - A palette, then roles. Every hex lives once in the palette (ivory/oat light surfaces, a 12-step ink dark neutral, Tailwind-weight hues); only the semantic roles become classes, and each points at a palette entry per mode. Light uses Anthropic’s soft white, ivory and oat colors.
- Three text colours.
text-foregroundfor titles and emphasis,text-readingfor prose in an article,text-muted-foregroundfor chrome. No fourth shade. - Three faces, by role.
font-body(Inter — body, UI and the header nav),font-display(Newsreader 200 — hierarchy comes from size, never a weight class),font-code(JetBrains Mono). The app loads them; the package ships none. - Two radii.
rounded-md10px for controls,rounded-xl16px for surfaces,rounded-fullfor pills. Every other name aliases to one of them. Cards areborder, not shadow. - One measure.
page-shellis 72rem plus a gutter added on top, so every page's content box lines up.
The reasoning behind each value is in the token files themselves
(src/tokens/*.ts) and in docs/.
- Next.js:
docs/adopting.md— the two-lineglobals.css, anapp/fonts.tsthat fills the three font slots withnext/font/google, and thelib/utils.tsshim that keepsnpx shadcn addworking. - GitHub Pages: link
site.cssfor shared page chrome and tokens; see adopting. - Static tokens only: link
tokens.cssbefore your stylesheet; theme follows the OS, or force it with<html data-theme="dark">. - React Native:
import { native } from "@aisocratic/design/native". - Overriding a token: write it unlayered after the import. Package tokens
live in
@layer base, so yours always win. Seedocs/theming.md.
skill/ is a Claude Code skill that teaches the system's rules and recipes.
Copy it into a consumer repo's .claude/skills/ai-socratic-design/ so agents reuse the
system instead of inventing styles.
pnpm install
pnpm verify # typecheck + build + tests
pnpm site:dev # the galleryReplace @aisocratic/stoa imports with @aisocratic/design. Font slots now use
--aisocratic-font-body, --aisocratic-font-display, and
--aisocratic-font-code; the former --stoa-font-* variables remain supported
as fallbacks during the compatibility window.
MIT © AI Socratic. Inter, Newsreader and JetBrains Mono are under the SIL Open Font License 1.1 and are loaded by the consuming application; this repository contains no font files.