esc back·browse·group·r random·t theme·c code
scratchpad / playground.tsx
50% / 50%
1import { useState } from "react";
2import { Button } from "@orbit/ui/button";
3
4// A tiny counter widget
5export function Counter() {
6 const [count, setCount] = useState(0);
7
8 return (
9 <div className="flex flex-col gap-3">
10 <h2 className="font-heading text-xl">
11 Live preview
12 </h2>
13 <p>You clicked {count} times.</p>
14 <Button onClick={() => setCount(count + 1)}>
15 Increment
16 </Button>
17 </div>
18 );
19}

Live preview

You clicked 3 times.

Ready · 42msv1.0.0