Mechanical Keyboard

Pro

A 75 percent mechanical keyboard with sculpted keycaps and recorded switch sound.

elite micro interactionsmechanicalkeyboardtabler icons react
Mechanical Keyboard component preview

Overview

Mechanical Keyboard is a React and Tailwind CSS virtual keyboard in a 75 percent Mac layout, in Next.js or any React app, drawn as one SVG that stays sharp at any size. Each keycap sinks when you click it or press the same key on your own keyboard. Sound comes from recorded Cherry MX Red, Brown and Blue switches, with press and release split. A rotary knob sets the volume by drag, scroll or arrow keys and reports it through onVolumeChange. It listens to the whole document, so set physicalKeysEnabled to false while a text field has focus.

Installation

Run the following command

~/your-project
pnpm dlx wensity@latest add mechanical-keyboard

Usage

Import MechanicalKeyboard from @/components/wensity/mechanical-keyboard and render it anywhere in your React or Next.js app. The source lands in your own repo, so every prop, class and animation below is yours to edit.

app/example.tsx
import { MechanicalKeyboard } from "@/components/wensity/mechanical-keyboard";
export default function Example() {
return (
<MechanicalKeyboard enableSound volume={0.55} />
);
}

Props

PropTypeDefaultDescription
theme"purple" | "wensity" | "ocean" | "moss" | "graphite""ocean"Colorway — drives the keycaps, case, plate and indicator LEDs.
enableSoundbooleantruePlay recorded switch sounds on press and release.
volumenumber0.5Sound volume from 0 to 1. The knob starts here and follows changes.
onVolumeChange(volume: number) => void-Fires as the knob is turned, with the new volume from 0 to 1.
switchType"linear" | "tactile" | "clicky""linear"Recorded switch: Cherry MX Red, Brown or Blue.
soundUrlstringassets.wensity.com …/switches.flacURL of the switch sound sprite. Override to self-host.
enableHapticsbooleantrueTrigger a short vibrate on pointer press when supported.
physicalKeysEnabledbooleantrueHighlight keys from real keyboard events.
forceActivebooleanfalseKeep listeners active even when the keyboard is off-screen.
onKeyEvent(event) => void-Fires on key down/up from physical or pointer input.
  • macOS Floating Dock component preview

    macOS Floating Dock

    A magnetic dock where icons inflate near the cursor and push their siblings aside.

  • Multi-Select Tag Input component preview

    Multi-Select Tag Input

    A tag input where pills pop in as you add them and slide out on remove, closing the gap without snapping the layout.

  • Shimmering Skeleton Wrapper component preview

    Shimmering Skeleton Wrapper

    One angled GPU sweep that travels across any placeholder geometry you wrap, never a separate shimmer stuttering per row.

  • Cool Button component preview

    Cool Button

    A dual-layer orbit glow that soft-spins around the edge of any button or link you wrap it around, at zero layout cost.