loading
Ships with an MCP server for AI agents

Motion for Blazor, written in C#

Springs, gestures, layout animations and variants, inspired by Framer Motion and rebuilt for Blazor. All of the maths runs in C#, none of the JavaScript wiring is yours, and no animation library ships alongside it.

dotnet add package Bit.Bmotion
Quick start

One component, two parameters

Where the element starts, and where it is going. Everything else — springs, gestures, keyframes, drag, layout — is the same component with more of them. Hover the box, then press it; the code underneath is the whole sample.

Razor
Why Bmotion

A C# engine, and the browser's own compositor

Compositor-eligible work — tweens and settled springs on transform and opacity, which is most enter, exit, hover and variant animation — is pre-sampled in C# and handed to the browser's Web Animations API, so it plays off the main thread with no per-frame interop at all. Everything else runs on the C# rAF engine.

.NET 8+ Targets .NET 8, 9 and 10
0 JavaScript dependencies
20 Worked examples, with source
MIT Free and open source

Everything in the box:

Spring physicsTweenInertiaKeyframesGesturesDragReorderAnimatePresenceVariantsSplit textwhileInViewLayout FLIPMotionValueScroll timelinesSequencesSVG pathsOKLabReduced motionMinimal JS
Capabilities

What you can build with it

Every card below links to the demo that proves it, and every one of those demos ships its own source.

Springs, tweens and inertia

Stiffness and damping, or bounce and duration if that is how you think - plus the full easings.net family, per property if you want.

Gestures

WhileHover, WhileTap and WhileFocus overlay a state on the base animation and revert themselves. Tap is keyboard-accessible out of the box.

Variants

Name your states once, then switch a whole subtree to one of them and stagger the children into place - even from a per-element function.

Keyframes

Sequences of values with their own offsets, per-segment easing and repeat behaviour, written as plain collection expressions.

Split text

Headlines that assemble a character, a word or a line at a time - split in C#, so nothing re-splits on re-render and a screen reader still reads the sentence.

AnimatePresence

Exit animations that run before the element actually leaves the DOM - for one element, a keyed list, or content being replaced.

Drag and reorder

Axis locks, container constraints, elastic edges, momentum - and lists that reorder themselves under the pointer without re-rendering.

Layout animations

FLIP the gap between two layouts, with border-radius correction and child counter-scaling handled for you.

Scroll and viewport

Hand a scroll-linked animation to the browser's native scroll timelines - no handler, no interop - or scrub it yourself as a MotionValue, or trigger it the first time an element comes into view.

Programmatic control

Animate by selector, interpolate a bare number, build a timeline with overlapping steps, then pause it and change its speed.

SVG and motion paths

Send an element along a path, draw a stroke on with pathLength, or morph one shape into another.

Accessibility and diagnostics

prefers-reduced-motion that softens rather than deletes, keyboard-accessible taps, and an inspector that shows what the engine is doing.

Documentation

Explore every demo

Twenty pages, in the order they are meant to be read. Press Ctrl K anywhere on the site to jump straight to one.

Start animating

Bmotion is part of bit platform, free and open source. The whole engine lives in the repository, so you can read it, file an issue against it, or send a pull request.

Bmotion 0 el ยท 0 active
An unhandled error has occurred. Reload ๐Ÿ—™