counter.tsxtsx
1import { useState } from "react";
2 
3export function Counter() {
4 const [count, setCount] = useState(0);
5 
6 // Increment on click
7 return (
8 <button onClick={() => setCount(count + 1)}>
9 Clicked {count} times
10 </button>
11 );
12}
counter.tsx (typing)tsx
1 
bash
pnpm add motion
npx shadcn@latest add @smoothui/code-block