v1.0
Registry / Page 03·07

Motion

Compare registry transitions and customise their easing.

Svelte Example.svelte
Press Enter to grab or resize widgets. Once grabbed, use Arrow keys to move/resize the widget, Enter to confirm the action, or Esc to cancel it.
Plan
Build
Review

Reduced motion is on.

Order: Plan, Build, Review

Registry boards, dashboards, and sortable lists use cssTransitionConfig() by default: 150ms for moves and resizing, and 200ms for drops. The headless components still leave transitions unset.

The layout and reorder callback update as soon as a drop is accepted, while the card animates into place.

The CSS preset uses sine in-out easing for a gentle start and finish when reordering, and circ-out easing for a quick drop that slows as it lands. Choose Spring for bounce, or None to disable movement. Both presets respect your system’s reduced-motion setting.

Installation

Component families install flexi-motion as a dependency. You can also install the utility directly:

npx shadcn-svelte@latest add https://flexiboards.dev/r/svelte/flexi-motion.json

Customise motion

Pass a preset or your own transition through config.widgetDefaults.transition. Set it to {} to disable movement. Other widget defaults and layout callbacks are preserved.

cssTransitionConfig() returns these settings:

MovementDurationEasingCSS override
Reorder150msSine in-out--ease-flexi-move
Drop200msCirc out--ease-flexi-drop
Resize150msEase-out--ease-flexi-resize

The easing values include fallbacks, so no stylesheet is required. To change a curve across your app, define its token in your global CSS. Tailwind also makes it available as an easing utility:

@theme {
	--ease-flexi-drop: cubic-bezier(0.16, 1, 0.3, 1);
}

Change durations in the transition configuration, in milliseconds.

The spring preset uses shorter response times and a small bounce on drop:

MovementResponseBounce
Reorder0.20s0.05
Drop0.24s0.18
Resize0.18s0

Spring response times are in seconds and control how quickly the spring reacts. They are not fixed animation durations; the spring stops when it comes to rest.

Accessibility

Registry roots disable their transition defaults when prefers-reduced-motion: reduce matches, including custom presets supplied through config.widgetDefaults.transition. The preference is observed while the page is open. Colour and opacity feedback remains available.

If you configure motion directly on an individual widget or target, apply reducedMotion.current there too. It assumes reduced motion during SSR.

Focus a grabber and press Enter to grab, use the arrow keys to move, then Enter to drop or Escape to cancel. Handles keep their accessible labels and widgets keep their grid semantics with either preset.