Command Button
Command Button: Interactive command button with live shortcut key badge and mechanical key switch feedback. Free MIT React & Next.js source with Motion and Tailwind CSS, live preview, CLI install and docs.
Install Command Button
npx motion-ui-skill add command-buttonComponents install as source into your project. The interactive page also includes preview, code, documentation and install tabs.
Dependencies
clsxreacttailwind-merge
Source files
Command Button
Interactive command button with live shortcut key badge and mechanical key switch feedback.
Install
npx motion-ui-skill add command-button
Dependencies
clsxreacttailwind-merge
Usage
"use client";
import { CommandButton } from "@/components/buttons/command-button";
export function CommandButtonDemo() {
return (
<div className="flex items-center justify-center p-6">
<CommandButton>Click Me</CommandButton>
</div>
);
}
API Reference
CommandButton
| Prop | Type | Default | Required | Description |
|---|---|---|---|---|
shortcut |
string |
"⌘K" | No | Keyboard shortcut modifier string |
className |
string |
— | No | Additional CSS classes |
children |
React.ReactNode |
— | No | Button label content |