szum-tech-design-system

Comprehensive reference for building UI with @szum-tech/design-system — a React component library built on Tailwind CSS 4+ and Radix UI. Use this skill whenever working in a project that imports from @szum-tech/design-system, when building or reviewing UI components, when choosing colors, typography, or layout styles, when deciding which component to use, or when creating new components following this design system's patterns. Covers the full color palette (OKLCH semantic tokens), all typography utility classes, every available component with its variants and props, animation classes, icon imports, and the CVA-based styling system. Always use this skill when the user asks about design tokens, Tailwind classes, or component APIs in the context of this library.

@szum-tech/design-system — Complete Reference

Installation & Setup

npm install tailwindcss @szum-tech/design-system

Consumer CSS file:

@import "../../../../node_modules/tailwindcss/dist/lib.d.mts";
@import "@szum-tech/design-system/tailwind/global.css";

@source "../node_modules/@szum-tech/design-system";

Imports

// All components
import { Button, Card, Badge } from "@szum-tech/design-system";

// Individual component (tree-shaking)
import { Button } from "@szum-tech/design-system/components/button";

// Icons
import {
  GoogleLogoIcon,
  Auth0LogoIcon,
  XLogoIcon,
} from "@szum-tech/design-system/icons";

// Utilities
import { cn } from "@szum-tech/design-system/utils";

// Hooks
import { useComposedRefs } from "@szum-tech/design-system/hooks";

Theme / Dark Mode

Dark mode is activated by adding .dark class to the root <html> element. All semantic color tokens automatically switch values.


Color Palette

All colors are CSS Custom Properties in OKLCH color space, available as Tailwind classes.

Semantic Tokens

TokenLightDarkUsage
background / foregroundwhite / near-blacknear-black / near-whitePage background and main text
primary / primary-foregroundblue-600 / blue-50blue-600 / blue-50Brand color, primary actions
secondary / secondary-foregroundlight gray / darkdarker gray / whiteSecondary actions, subtle elements
muted / muted-foregroundlight gray / graydark gray / mid-grayDisabled states, placeholders, subtle text
accent / accent-foregroundlight gray / darkmedium gray / whiteHover states, highlighted items
success / success-foregroundgreen-600 / green-50green-700 / green-50Success states
warning / warning-foregroundyellow-600 / yellow-50yellow-700 / yellow-50Warning states
error / error-foregroundred-600 / red-50red-700 / red-50Error/destructive states
borderlight graywhite/10%Element borders
inputlight graywhite/15%Form input borders
ringgraymid-grayFocus ring color
card / card-foregroundwhite / near-blackdark / whiteCard backgrounds
popover / popover-foregroundwhite / near-blackmedium dark / whitePopover/dropdown backgrounds

Sidebar Tokens

sidebar, sidebar-foreground, sidebar-primary, sidebar-primary-foreground, sidebar-accent, sidebar-accent-foreground, sidebar-border, sidebar-ring

Chart Tokens

chart-1 through chart-5 — blue scale (300→800) for data visualization.

Using Colors in Tailwind

// Background
<div className="bg-primary text-primary-foreground" />
<div className="bg-card text-card-foreground" />
<div className="bg-muted text-muted-foreground" />
<div className="bg-success/10 text-success border-success/20" />

// Borders
<div className="border border-border" />
<div className="ring ring-ring/50" />

Border Radius

--radius: 0.25rem — components use rounded (0.25rem) by default.


Typography

Fonts

  • font-poppins — primary sans-serif (headings, body)
  • font-code — JetBrains Mono monospace (code)

Typography Utility Classes

These are custom @utility classes — use them directly in className.

Display (hero text, landing pages)

ClassSize (mobile → desktop)WeightUse for
text-display-xl3rem → 4.5rem800 extraboldHero headlines
text-display-lg2.5rem → 3.75rem800 extraboldLarge hero text
text-display-md2rem → 3rem700 boldSection heroes
text-display-sm1.75rem → 2.25rem700 boldSub-heroes

Headings

ClassSize (mobile → desktop)Weight
text-heading-h11.75rem → 2rem700 bold
text-heading-h21.375rem → 1.5rem600 semibold
text-heading-h31.125rem → 1.25rem600 semibold
text-heading-h41rem → 1.125rem600 semibold

Body

ClassSizeWeightLine height
text-body-xl1.25rem (20px)4001.6 relaxed
text-body-lg1.125rem (18px)4001.6 relaxed
text-body-default1rem (16px)4001.6 relaxed
text-body-sm0.875rem (14px)4001.5
text-body-xs0.75rem (12px)4001.5

Special Text

ClassDescription
text-leadLarge intro paragraph — body-xl, 1.7 line-height, muted-foreground color
text-muteSecondary/subtle text — body-sm, muted-foreground color
text-smallFine print — body-xs, muted-foreground color
text-codeInline code — JetBrains Mono, bg-muted, rounded, px-1.5 py-0.5
text-blockquoteQuote block — left border border-border, muted-foreground, padded
// Usage examples
<h1 className="text-display-xl font-poppins">Hero Title</h1>
<h2 className="text-heading-h2">Section Heading</h2>
<p className="text-body-default">Regular body text</p>
<p className="text-lead">Intro paragraph with subtle color</p>
<span className="text-mute">Helper text</span>
<code className="text-code">const x = 1</code>

Animations

Custom Tailwind animation classes (defined in animation.css):

ClassEffectUse case
animate-slideDownAndFadeFade in from aboveTooltips opening downward
animate-slideUpAndFadeFade in from belowTooltips opening upward
animate-slideLeftAndFadeFade in from rightTooltips opening leftward
animate-slideRightAndFadeFade in from leftTooltips opening rightward
animate-marqueeHorizontal infinite scrollMarquee component
animate-marquee-verticalVertical infinite scrollVertical marquee
animate-accordion-downExpand accordion panelAccordionContent open
animate-accordion-upCollapse accordion panelAccordionContent close

Components

For full component details, see references/components.md.

Quick Reference — All Components

Form components: Input, Textarea, Checkbox, RadioGroup, Select, Label, Field, FieldGroup, FieldSet

Feedback & status: Alert, AlertDialog, Badge, BadgeOverflow, Status, Spinner, Toaster

Layout & containers: Card, Separator, ScrollArea, Header, Masonry

Navigation: Tabs, Accordion, Stepper

Overlays: Dialog, Sheet, Tooltip

Content display: Avatar, Item, Timeline, Empty, Progress, Carousel, ColorSwatch, Marquee

Animated text: TypingText, WordRotate, CountingNumber

Icons: GoogleLogoIcon, Auth0LogoIcon, XLogoIcon


Core Patterns

cn() for class merging

Always use cn() (combines clsx + tailwind-merge) when combining classes:

import { cn } from "@szum-tech/design-system/utils";
className={cn("base-classes", conditional && "extra-class", className)}

asChild pattern (polymorphic rendering)

Most interactive components support asChild via Radix UI Slot:

<Button asChild>
  <a href="/about">About</a>
</Button>

data-slot attributes

Components expose data-slot="component-name" for CSS targeting and testing selectors.

CVA variants pattern

Variants are typed via VariantProps<typeof componentVariants> — TypeScript autocompletes all valid values.


Read references/components.md for the full API of every component with variants, props, and usage examples.