Utility
AI
Terminal
Installation
pnpm dlx shadcn@latest add @termcn/spinner
Usage
import { Spinner } from "@/components/ui/spinner";<Spinner type="dots" label="Loading components" />Examples
Spinner Styles
Multiple built-in animation styles.
Terminal
import { Box } from "ink";
import { Spinner, spinnerNames } from "@/registry/bases/ink/ui/spinner";
export default function SpinnerStyles() {
return (
<Box flexDirection="column" gap={1}>
{spinnerNames.map((name) => (
<Spinner key={name} label={name} type={name} />
))}
</Box>
);
}
API Reference
Spinner
| Prop | Type | Default |
|---|---|---|
type | SpinnerName from cli-spinners | "dots" |
label | string | undefined |
color | string | undefined |
fps | number — used only with custom frames | 12 |
frames | string[] | undefined |