Search

Search components and flows across the catalog

ThatDesignUIOriginalInteractive preview

3D keycap button

A chunky mechanical-keyboard key that physically sinks into its side wall when pressed, with a counter underneath.

Category
Buttons
Platform
Responsive

Interactive componentClick through it, resize it, or switch states. It’s real UI, not a screenshot.Default state

Use this component

Free to use. It works on its own in any React and Tailwind project, so you can add it with one command, paste the code, or hand the prompt to your coding agent.

FreeReact 18+Tailwind v3.4 or v4No extra packages

1. Add it with the shadcn CLI

npx shadcn@latest add https://www.thatdesignui.com/r/keycap-button.json

2. Use it

Every prop is optional
app/page.tsx
import KeycapButton from "@/components/keycap-button";

export default function Page() {
  return <KeycapButton />;
}

Prefer to paste it yourself? Open the .

Under the hood

How it’s built

What’s inside

  1. A 160 by 96px key: a dished off-white top (radial highlight, thin white edge) sitting on a 10px taupe side wall, with a soft shadow below, on a warm grey panel.
  2. The top shows a small grey shortcut hint at the top left and a bold 22px label at the bottom left.
  3. Pressing sinks the top 8px into the wall; a line under the key counts the presses.

How it behaves

  • Pointer, Enter and Space all press it.
  • The press count is announced.
  • Focus shows a dark ring around the whole key.
  • Disabled is faded and doesn't sink.

More from ThatDesignUI

Image gallery lightbox

Image gallery lightbox

ThatDesignUIOriginalMedia component

Notification center

Notification center

ThatDesignUIOriginalNotifications component

Interactive chart card

Interactive chart card

ThatDesignUIOriginalDashboard component

Multi-select combobox

Multi-select combobox

ThatDesignUIOriginalForms component