Skip to main content
Neighborhood Design System v5.0.0-rc.2

Motion

Duration tokens keep state changes moving at a consistent speed across the design system.

Use the semantic motion tokens, --nbhd-motion-duration-* and --nbhd-motion-easing-*, in your CSS. Each one points to the matching step of the base scale (--nbhd-motion-duration-normal → --nbhd-base-motion-duration-normal). Components use the same tokens.

Duration tokens set how long a change of state takes, such as a hover color or a border appearing. Easing tokens set how that change speeds up and slows down: standard (ease) for most changes, inOut (ease-in-out) for buttons and other controls that move evenly both ways. Choose the property yourself. Both work for transitions and animations.

.tile {
  transition-property: background-color;
  transition-duration: var(--nbhd-motion-duration-normal);
  transition-timing-function: var(--nbhd-motion-easing-inOut);
}

Properties

TokenCSS VariableValue
motion.duration.fastvar(--nbhd-motion-duration-fast)0.05s
motion.duration.normalvar(--nbhd-motion-duration-normal)0.2s
motion.duration.slowvar(--nbhd-motion-duration-slow)0.5s
motion.easing.standardvar(--nbhd-motion-easing-standard)ease
motion.easing.inOutvar(--nbhd-motion-easing-inOut)ease-in-out
Esc
↑ ↓ to move↵ to open