Skip to content

@vibe-labs/design-gradients

Gradient tokens and utility classes for the Vibe Design System.

Usage

css
@import "@vibe-labs/design-gradients";

Contents

Tokens (gradients.css)

CSS custom properties defined in @layer vibe.tokens:

Direction

TokenDefault
--gradient-directionto bottom

Card / Surface

TokenDescription
--gradient-cardStandard card gradient (neutral 800 → 900)
--gradient-card-subtleSubtle card gradient (neutral 850 → 900)
--gradient-card-elevatedElevated card gradient (neutral 750 → 850)

Accent

TokenDescription
--gradient-accentBrand accent gradient (135deg)
--gradient-accent-subtleSubtle accent wash (low opacity)

Functional

TokenDescription
--gradient-shimmerHorizontal shimmer effect
--gradient-fade-t/b/l/rDirectional fades to --surface-base
--gradient-depthRadial vignette overlay

Generated Utilities (gradients.g.css)

Utility classes generated into @layer vibe.utilities via the build script.

Direction

.bg-gradient-to-t · .bg-gradient-to-tr · .bg-gradient-to-r · .bg-gradient-to-br · .bg-gradient-to-b · .bg-gradient-to-bl · .bg-gradient-to-l · .bg-gradient-to-tl · .bg-gradient-radial

Sets --gradient-direction for use in custom gradients.

Semantic Gradients

  • Card: .bg-gradient-card · .bg-gradient-card-subtle · .bg-gradient-card-elevated
  • Accent: .bg-gradient-accent · .bg-gradient-accent-subtle
  • Shimmer: .bg-gradient-shimmer
  • Fades: .bg-gradient-fade-t · .bg-gradient-fade-b · .bg-gradient-fade-l · .bg-gradient-fade-r
  • Depth: .bg-gradient-depth
  • Reset: .bg-gradient-none

Dist Structure

FileDescription
index.cssBarrel — imports both files below
gradients.cssToken definitions
gradients.g.cssGenerated utility classes

Dependencies

Requires --color-neutral-*, --color-accent, --color-accent-dark, and --surface-base tokens from upstream packages.

Build

bash
npm run build