Skip to main content

I Built 46 React Components With Spring Physics and Synthesized Sound

No audio files, no CSS libraries. Here's what's in ModUI, and why I built it.

Updated 2 min readMarkdown
I Built 46 React Components With Spring Physics and Synthesized Sound

I've been building ModUI, an open-source collection of 46 React components meant to feel physical: things that spring, tilt, snap, and make sound.

๐Ÿ‘‰ Live demos: https://modui.online

๐Ÿ‘‰ Source (MIT): https://github.com/ShakilUrRehman21/modui

What's in it

A few of my favorites:

  • Studio Reel-to-Reel Tape Deck: spinning reels and transport controls, with the sound generated in the browser
  • Mechanical Aperture Iris Lens: interlocking blades that open and close like a camera lens
  • Cursor Spark Trail: a canvas ribbon that follows your pointer's velocity
  • Interactive Signature Pad: a calligraphic ink canvas with SVG/PNG export
  • Cylindrical 3D Carousel: a perspective stage with drag inertia
  • Reactor Border Peel Button: corner brackets that peel back with spring physics

The full list is at modui.online/components.

The rules I set for myself

  1. No runtime CSS dependencies. No Tailwind, no styled-components, no Emotion. Plain CSS custom properties, so you can retheme by changing tokens.
  2. Copy the source, own the code. Each component is a .tsx and .css pair. No package to install and no version to get stuck on.
  3. Synthesized sound. Audio feedback comes from the Web Audio API's oscillators, with no audio files to ship. It's opt-in per component.
  4. Accessible by default. Visible focus rings, keyboard navigation, ARIA attributes, and prefers-reduced-motion support.

Quick usage

import { ReactorBorderPeelButton } from '@/components/ui/reactor-border-peel-button';

export function HeroCTA() {
  return (
    <ReactorBorderPeelButton variant="chromatic-split" size="lg" magnetic soundEnabled>
      Explore Components
    </ReactorBorderPeelButton>
  );
}

Copy the component's folder into your project and adjust the import path.

Why synthesized sound?

Shipping audio files for UI sounds means extra requests, licensing questions, and assets to maintain. With the Web Audio API you can generate short sounds on the fly from an oscillator and a volume envelope, and tune them in code. Browsers only start audio after a user interaction, so each component's sound starts on the first click or tap.

What I'd love feedback on

  • Which component would you actually use in a project?
  • What's missing from the list?
  • Does anything feel off on your device or browser?

If ModUI is useful, a โญ on GitHub helps other developers find it.

Thanks for reading. I'll reply to every comment.

About the author

  • Frontend developer from Delhi, India. I build ModUI, a library of 46 open-source React components with spring physics and synthesized Web Audio haptics, with no CSS libraries and no audio files. Here I write about how interactive UI is built: physics, sound synthesis, and the tooling behind it.

No comments yet. Be the first to comment.