Loading component…
Loading component…
A small turning arc for work that runs right now
To reuse this local React demo, copy all files from the Code tab into the same folder, then import Spinner from ./spinner.
import { Spinner } from "@/components/ui/spinner";
export function ConnectButton({ busy, onConnect }: { busy: boolean; onConnect: () => void }) {
return (
<button type="button" aria-disabled={busy || undefined} onClick={() => !busy && onConnect()}>
{busy ? <Spinner /> : <PlugIcon />}
{busy ? "Connecting" : "Connect GitHub"}
</button>
);
}
// On its own, without words next to it: give it a label
<Spinner size={12} label="Checking domain" />| Name | Type | Default | Description |
|---|---|---|---|
| size | number | 14 | Width and height in px |
| label | string | Announced as a status (role="status" with aria-label). Leave it out when text next to it already says what happens – then it is hidden from screen readers | |
| className | string | Extra classes – color it with color, it draws in currentColor | |
| ...svg props | ComponentProps<"svg"> | style, ref, data-* – everything goes to the <svg> |
A fixed size in px, so it never pushes text around; sits on the text's middle with vertical-align
Dark mode needs nothing: it takes the text color
@import "tailwindcss"; in your main CSS file.