magic-ui
components
ui

script-copy-btn

Copy code to clipboard.

animated
button
effect
flex
hover
motion
navigation
positioning
text
transition
View Docs

Source Code

Files
script-copy-btn
1import { ScriptCopyBtn } from "@/components/magicui/script-copy-btn";
2 
3export function ScriptCopyBtnDemo() {
4  const customCommandMap = {
5    npm: "npm run shadcn add button",
6    yarn: "yarn shadcn add button",
7    pnpm: "pnpm dlx shadcn@latest add button",
8    bun: "bun x shadcn@latest add button",
9  };
10  return (
11    <ScriptCopyBtn
12      showMultiplePackageOptions={true}
13      codeLanguage="shell"
14      lightTheme="nord"
15      darkTheme="vitesse-dark"
16      commandMap={customCommandMap}
17    />
18  );
19}