Skip to content

@vibe-labs/design-transitions

Transition, animation, and easing tokens and utilities for the Vibe Design System.

Usage

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

Contents

Tokens & Keyframes (transitions.css)

Duration Tokens (@layer vibe.tokens)

TokenValue
--duration-instant0ms
--duration-fast75ms
--duration-normal150ms
--duration-moderate200ms
--duration-slow300ms
--duration-slower500ms
--duration-lazy700ms

Easing Tokens (@layer vibe.tokens)

Standard: --ease-linear · --ease-default · --ease-in · --ease-out · --ease-in-out

Expressive: --ease-spring · --ease-bounce · --ease-elastic · --ease-smooth

Directional: --ease-decel (enter) · --ease-accel (exit) · --ease-sharp

Keyframe Animations

Defined globally (outside @layer), namespaced with vibe- prefix:

FamilyKeyframesUse case
Fadevibe-fade-in, vibe-fade-outOpacity transitions
Scalevibe-scale-in, vibe-scale-outModals, popovers, tooltips
Slidevibe-slide-in-{up|down|left|right}, vibe-slide-out-{up|down|left|right}Content, dropdowns, toasts (8px nudge)
Panelvibe-panel-in-{left|right|bottom}, vibe-panel-out-{left|right|bottom}Drawers, sheets (100% off-screen)
Attentionvibe-spin, vibe-ping, vibe-pulse, vibe-bounce, vibe-wiggle, vibe-shakeLooping emphasis / feedback

Generated Utilities (transitions.g.css)

All classes generated into @layer vibe.utilities.

Duration

.duration-{name} — instant, fast, normal, moderate, slow, slower, lazy

Easing

.ease-{name} — linear, default, in, out, in-out, spring, bounce, elastic, smooth, decel, accel, sharp

Transition Property

.transition-all · .transition-colors · .transition-opacity · .transition-transform · .transition-shadow · .transition-size

Each sets transition-property, with duration/easing defaulting to --transition-duration / --transition-easing (fallback: normal / ease-out).

Delay

.delay-{name} — same scale as duration

Animation Utilities

Looping: .animate-wiggle · .animate-bounce · .animate-pulse · .animate-spin · .animate-ping

One-shot: .animate-shake

Enter: .animate-fade-in · .animate-scale-in · .animate-slide-in-{up|down|left|right}

Exit: .animate-fade-out · .animate-scale-out

Control: .animate-none · .animate-paused · .animate-running · .animate-once · .animate-infinite

Fill mode: .animate-fill-both · .animate-fill-forwards · .animate-fill-none

Reduced Motion (@layer vibe.accessibility)

  • .motion-reduce — minimizes duration/iteration on prefers-reduced-motion: reduce
  • .motion-safe — removes animation/transition entirely on prefers-reduced-motion: reduce

Dist Structure

FileDescription
index.cssBarrel — imports both files below
transitions.cssTokens, keyframe definitions
transitions.g.cssGenerated utility classes

Dependencies

None — this package is self-contained.

Build

bash
npm run build