Syed

Chrome Keycap Button

Buttons 18

About

Tactile industrial chrome keycap button featuring a multi-layered polished bezel, bead-blasted anodized aluminum cap, dynamic 5x7 SVG dot-matrix legend, live Spacebar actuation, and synthesized mechanical switch audio.

Built with React and Tailwind. Copy the prompt and paste it into Claude Code, Cursor or Lovable: your agent adds Chrome Keycap Button to your project and fits it to your theme.

Code

How Chrome Keycap Button is used: the demo's code. The component's own source comes with a free account.

Usage.tsx

"use client";

import React from "react";
import {
  ChromeKeycapButton,
  type ChromeKeycapFinish,
  type ChromeKeycapSize,
} from "@/components/ui/chrome-keycap-button";

const settings = {
  label: "SPACE",
  size: "md",
  finish: "silver",
  orbitSpeed: 6,
  soundEnabled: true,
  bindSpacebar: true,
};

const VALID_SIZES: ChromeKeycapSize[] = ["sm", "md", "lg"];
const VALID_FINISHES: ChromeKeycapFinish[] = [
  "silver",
  "graphite",
  "champagne",
];

export default function ChromeKeycapButtonDemo(
  props: Partial<typeof settings>
) {
  const config = { ...settings, ...props };

  const size: ChromeKeycapSize = VALID_SIZES.includes(
    config.size as ChromeKeycapSize
  )
    ? (config.size as ChromeKeycapSize)
    : "md";

  const finish: ChromeKeycapFinish = VALID_FINISHES.includes(
    config.finish as ChromeKeycapFinish
  )
    ? (config.finish as ChromeKeycapFinish)
    : "silver";

  const label =
    typeof config.label === "string" && config.label.trim().length > 0
      ? config.label
      : "SPACE";

  const orbitSpeed =
    typeof config.orbitSpeed === "number" && Number.isFinite(config.orbitSpeed)
      ? Math.max(0, Math.min(30, config.orbitSpeed))
      : 6;

  return (
    <div className="w-full min-h-[360px] flex items-center justify-center p-8">
      <ChromeKeycapButton
        label={label}
        size={size}
        finish={finish}
        orbitSpeed={orbitSpeed}
        soundEnabled={Boolean(config.soundEnabled)}
        bindSpacebar={Boolean(config.bindSpacebar)}
      />
    </div>
  );
}

export { ChromeKeycapButtonDemo as Demo, ChromeKeycapButtonDemo as demo };

Dependencies

More by Syed

View all
  • Animated Beam Integration

    Animated Beam Integration

    150
  • Emotion Wheel v2

    Emotion Wheel v2

    137
  • SpatialCardCarousel

    SpatialCardCarousel

    122
  • Agency Bento Grid

    Agency Bento Grid

    95
  • Morphing Island Navbar

    Morphing Island Navbar

    90
  • Projec tWorkflow Tree

    Projec tWorkflow Tree

    88
  • Unlimited Design Hero

    Unlimited Design Hero

    83
  • Schedule Calendar

    Schedule Calendar

    67

More in Buttons

View all
  • Button

    Button

    20
  • Button

    Button

    3
  • Button Group

    Button Group

    18
  • Button

    Button

    149
  • Icon Label Subtext Button

    Icon Label Subtext Button

    69
  • Button

    Button

    9
  • Button

    Button

    37
  • Texture Button

    Texture Button

    113