Skip to content

Token system + PandaCSS preset #3

@mathieusouflis

Description

@mathieusouflis

What to build

Define the full visual language as a PandaCSS config and export it as a standalone preset that consuming apps can import.

Set up:

  • panda.config.ts with semantic color tokens using _dark condition (no hardcoded colors in components — everything references semantic tokens): background, foreground, primary, muted, border, and their variants
  • Full color palette underneath the semantic aliases
  • Typography scale (font sizes, weights, line heights mapped to named text styles)
  • Spacing scale
  • Border radii scale
  • Shadow scale
  • Z-index scale
  • Breakpoints: sm (mobile), md (tablet), lg (desktop)
  • PandaCSS darkMode: 'class' config pointing at .dark on <html>
  • Exported preset at src/preset.ts — the @version14/ui/preset entrypoint — so consuming apps can do import preset from '@version14/ui/preset' in their own panda.config.ts

Acceptance criteria

  • import preset from '@version14/ui/preset' resolves and exports a valid PandaCSS preset object
  • Semantic color tokens switch correctly between light and dark values when .dark is on <html> (verifiable in Storybook or a test page)
  • All breakpoints (sm, md, lg) are defined and usable in PandaCSS recipes
  • No hardcoded color values exist in the preset — all colors go through the palette → semantic alias chain
  • TypeScript types for the preset export are correct

Blocked by

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions