@aaronlew-suite/ui
v0.1.4
Published
The suite design system: Tailwind theme, primitives, AppShell and AccountMenu (ARCHITECTURE §3.1).
Readme
@aaronlew-suite/ui
The suite design system (ARCHITECTURE §3.1): Tailwind v4 theme tokens, primitives, and the shared app frame. Every app looks like one product because every app imports this.
Published on public npm (registry.npmjs.org): installing needs no token or .npmrc entry.
/* src/index.css */
@import 'tailwindcss';
@import '@aaronlew-suite/ui/theme.css';import { AppShell, AccountMenu, Button, Card } from '@aaronlew-suite/ui';
import { useAuth } from '@aaronlew-suite/auth-client';
const { user, signOut } = useAuth();
<AppShell
brand="Tracker"
account={<AccountMenu user={user} onSignOut={signOut} currentAppId="tracker" />}
>
…
</AppShell>;AccountMenu's Sign out calls the onSignOut you pass. With auth-client's signOut (as above) that
ends this app's session, then sends the browser to Authentik's end-session URL, which ends the Authentik
session too and returns to the app (ARCHITECTURE §2.3.4).
| Export | |
| ------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| theme.css | Semantic colour tokens (bg, surface, fg, fg-muted, border, accent, danger, ring) with light and dark values, rounded-control / rounded-card, and @source so Tailwind sees this package's classes. Tailwind v4 has no JS presets, so tokens are CSS — this replaces the tailwindPreset ARCHITECTURE §3.1 names |
| AppShell | Header, primary nav slot, account slot, skip link, <main id="main"> |
| AccountMenu | Avatar, name, Manage account (Authentik /if/user/), app switcher filtered by the user's groups, theme picker, Sign out. Takes the User from useAuth() structurally — ui does not depend on auth-client |
| Button, Input, Card, Table, Modal | The starter primitives. Modal is a native <dialog>; Table renders cells as text |
| useTheme | Light / dark / system via a .dark class on <html> |
| SUITE_APPS | The app-switcher list: only apps live in the suite. Add a line in the release that launches one |
