New:Introducing Socket Scanning for VS Code Marketplace Extensions.Learn more →
Get Started

@codellyson/justui

Package Overview
Dependencies
Maintainers
1
Versions
7
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@codellyson/justui

Shared design system for the just* app family — theme tokens, six built-in themes (GitHub, Espresso, Catppuccin Mocha, Gruvbox, Nord, Solarized), a no-flash boot script, and per-framework component adapters (Astro today; React/Vue next).

Source
npmnpm
Version
0.1.1
Version published
Weekly downloads
6
-60%
Maintainers
1
Weekly downloads
 
Created
Source

@codellyson/justui

Shared design system for the just* app family — theme tokens, six built-in themes (GitHub, Espresso, Catppuccin Mocha, Gruvbox, Nord, Solarized), a no-flash boot script, ready-made Astro components, and a Tailwind preset.

See STYLE_GUIDE.md for the full design spec.

Install

pnpm add @codellyson/justui

Peers your app needs separately:

pnpm add @fontsource-variable/geist @fontsource-variable/geist-mono tailwindcss

Quick start (Astro + Tailwind)

1. Tailwind preset

// tailwind.config.mjs
import @codellyson/justuiPreset from '@codellyson/justui/tailwind-preset';

export default {
  presets: [@codellyson/justuiPreset],
  content: [
    './src/**/*.{astro,html,js,ts,jsx,tsx,md,mdx}',
    // Include the package's components so Tailwind generates classes
    // used inside Button.astro / ThemeToggle.astro.
    './node_modules/@codellyson/justui/src/**/*.{astro,js,ts}',
  ],
};

2. Token fallback + Tailwind directives

/* src/styles/global.css */
@import "@codellyson/justui/tokens.css";

@tailwind base;
@tailwind components;
@tailwind utilities;

3. Boot the theme before first paint

---
// src/layouts/Layout.astro
import '@fontsource-variable/geist';
import '@fontsource-variable/geist-mono';
import '../styles/global.css';
---
<!doctype html>
<html lang="en">
  <head>
    <!-- Runs before <body> renders so the right palette paints first. -->
    <script>
      import { bootTheme } from '@codellyson/justui/boot';
      bootTheme({ keyPrefix: 'myapp' });
    </script>
  </head>
  <body><slot /></body>
</html>

4. Drop in the picker

---
import ThemeToggle from '@codellyson/justui/astro/ThemeToggle.astro';
---
<ThemeToggle />

The floating button at bottom-right opens a panel with a mode toggle (light/dark) + all six themes. State persists to myapp.theme.id / myapp.theme.mode.

What's in the package

ExportPurpose
@codellyson/justuiBUILT_IN_THEMES, DEFAULT_THEME_ID, VAR_MAP, bootTheme
@codellyson/justui/bootJust bootTheme — small import if you only want this
@codellyson/justui/themesJust the theme catalog
@codellyson/justui/tokens.css:root fallback (Espresso dark)
@codellyson/justui/tailwind-presetTailwind config preset
@codellyson/justui/astro/Button.astroPrimary / secondary button
@codellyson/justui/astro/ThemeToggle.astroFloating theme picker

Per-app prefix

Each just* app should call bootTheme({ keyPrefix: '<appname>' }) so theme state doesn't collide on shared origins. The ThemeToggle reads the prefix from the global window.__JUSTUI__ that bootTheme() stamps, so the same component works in every app without per-app config.

If you want themes to be shared across apps on the same origin (so picking Gruvbox in one carries to the other), use the default keyPrefix: 'justui' everywhere.

License

MIT

Keywords

design-system

FAQs

Package last updated on 16 Jun 2026

Related posts