Open Sourcery
The Complete Library
Every package Magic Spells has published — 34 of them across 7 categories. Motion and scroll engines, overlays and panels, accessible inputs, media, commerce and developer tools. All MIT, most with zero dependencies.
Motion & Scroll
10 packagesThe engine stack. Springs at the bottom, scenes and timelines on top.
Physics Engine
@magic-spells/physics-engine
Frame-rate independent springs. The base layer the rest of the motion stack is built on.
Demo: Parameter Lab — drag tension and friction, watch the spring change under you.
Animation Engine
@magic-spells/animation-engine
Declarative scene sequencing — chainable scenes with easing, staggers, loops, and randomness.
Demo: Squash and stretch — the clearest "this is not CSS easing" moment in the demo.
Timeline Engine
@magic-spells/timeline-engine
A scrubbable timeline of keyframe clips at offset start times, driven by a clock or a scroll position.
Demo: Your cursor is the playhead.
$ npm i @magic-spells/timeline-engineFrame Engine
@magic-spells/frame-engine
Calculates the intermediate states between CSS keyframes, so any property can be scrubbed.
Demo: Multi-Property Orchestra — one scrub, six properties interpolating at once.
Morph Engine
@magic-spells/morph-engine
A spring-driven blob morphs from one element rect and style to another. Interrupt it mid-flight and it reverses.
Demo: Task board card opening into its detail view.
$ npm i @magic-spells/morph-engineSplit Text
@magic-spells/split-text
Text reveals by word, character, or line, split from the real layout. Eight effects, no dependencies.
Demo: Bloom into focus.
$ npm i @magic-spells/split-textReveal
@magic-spells/reveal
Scroll reveals written as classes. Thirty-two effects, stagger groups, and no dependencies.
Scroll Progress
@magic-spells/scroll-progress
Scroll progress with configurable playhead anchors, smoothing, and CSS variable output.
Demo: Sunset to Starlight — scroll drives a full colour scene.
Scroll Trigger
@magic-spells/scroll-trigger
Powering this page
Tracks section visibility and syncs navigation state. The sticky menu on this page is running it.
Demo: A mini scroll container inside the card with its own tiny sticky nav tracking stub sections.
Scroll Stack
@magic-spells/scroll-stack
A natively scrolling list whose items animate at the scrollport edges instead of clipping — the exiting one stops dead at the boundary and fades while the next slides over it.
Overlays & Panels
8 packagesPanels that open, stack, and resize — native <dialog> semantics with gesture and spring behaviour layered on.
Sheet
@magic-spells/sheet
Recommended
Gesture-driven edge sheets and floating cards on a real native dialog — spring motion, snap points, responsive profiles.
Demo: Snap points — flick it and it settles on the nearest rest height.
$ npm i @magic-spells/sheetDialog Panel
@magic-spells/dialog-panel
A lightweight wrapper around native <dialog> with state-driven animations. The primitive the sheets sit on.
Demo: State Machine — the lifecycle visualised as states lighting up in order.
Bottom Sheet
@magic-spells/bottom-sheet
The lean bottom-only build: pointer dragging, velocity dismissal, scroll-aware gesture policy, safe-area spacing.
Demo: Scrolling hands off to dragging.
Panel Stack
@magic-spells/panel-stack
A nested panel stack with fluid push and pop transitions — drill-down menus, settings flows, multi-step forms.
Demo: A four-step account flow pushing and popping.
$ npm i @magic-spells/panel-stackSplit Panel
@magic-spells/split-panel
Resizable split panes — draggable dividers, horizontal and vertical, nesting, min/max constraints, and layouts that persist.
Demo: Drag the divider; the nested split inside one pane resizes with it.
Dropdown Panel
@magic-spells/dropdown-panel
An accessible anchored dropdown panel — the positioning primitive, under 1 KB of CSS.
Focus Trap
@magic-spells/focus-trap
Traps keyboard focus inside a container. Small, boring, and load-bearing for everything modal.
Notification Stack
@magic-spells/notification-stack
Stacked-card and list toasts with auto-dismiss timers.
Inputs & Controls
7 packagesAccessible replacements for the form primitives that browsers style badly.
Select Dropdown
@magic-spells/select-dropdown
A fully accessible custom select — keyboard navigation, grouped options, theming via custom properties. ~3.5 KB gzipped.
Demo: Every Country — typeahead through 200 options without a frame drop.
Collapsible Content
@magic-spells/collapsible-content
Height-animated disclosure with accordion grouping, custom easing, and real keyboard semantics.
Demo: Accordion Group — opening one closes the last.
Tab Group
@magic-spells/tab-group
Tab list and tab panel elements with roving focus and three ready-made skins.
Demo: Cycle the underline, capsule, and outlined skins on the same markup.
Quantity Input
@magic-spells/quantity-input
A stepper input with min and max clamping, custom icons, and change events.
Range Slider
@magic-spells/range-slider
Single and dual-thumb sliders with ticks and step snapping.
Color Picker
@magic-spells/color-picker
Saturation area, hue and alpha sliders, hex input, palette swatches.
Date Picker
@magic-spells/date-picker
A calendar popover with keyboard navigation, ranges, and locales.
Media & Content
4 packagesImages, video, and content that loads, swaps, or moves.
Image Zoom
@magic-spells/image-zoom
Pinch-to-zoom and pan for images, with programmatic control and gallery support.
Demo: Pinch to zoom, with a scroll-wheel path for desktop.
Scrolling Content
@magic-spells/scrolling-content
An infinite marquee — hover to pause, drag to scrub, no dependencies.
Demo: Drag to scrub the marquee back and forth.
Load Content
@magic-spells/load-content
Loads and swaps content in place, with optional pagination.
Demo: A product grid paginating without a page change.
Responsive Video
@magic-spells/responsive-video
Swaps video sources and poster images across breakpoints.
Commerce
3 packagesShopify-facing cart and promotion components.
Cart Progress Bar
@magic-spells/cart-progress-bar
A free-shipping threshold bar with currency formatting and themeable fills.
Demo: Try it live — the bar filling toward the threshold as the total climbs.
Gift With Purchase
@magic-spells/gift-with-purchase
Threshold promotions that unlock a gift as the cart total crosses a line.
Demo: Low Threshold Gift unlocking as the total rises.
Cart Panel
@magic-spells/cart-panel
Manages Shopify cart data and AJAX, and delegates modal behaviour to dialog-panel. Includes the <cart-item> element for each line, imported from @magic-spells/cart-panel/cart-item.
Developer Tools
1 packageThings that plug into an editor, a browser, or an agent.
Figma MCP Bridge
@magic-spells/figma-mcp-bridge
An MCP server that lets Claude read and manipulate Figma documents over a WebSocket bridge.
Build & Utilities
1 packageSmall pieces of plumbing worth publishing on their own.
Event Emitter
@magic-spells/event-emitter
The tiny emitter the other packages share, published so you can share it too.