Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
51 changes: 43 additions & 8 deletions src/routes/ds.spinner.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,19 +7,36 @@ export const Route = createFileRoute('/ds/spinner')({
component: SpinnerPage,
head: () => ({
meta: seo({
title: 'Spinner | TanStack Design System',
description: 'The Spinner loading indicator.',
title: 'Spinners | TanStack Design System',
description:
'Spinner and Headbanger loading indicators, sizing, colors, and source code.',
}),
}),
})

function SpinnerPage() {
return (
<DsPage
title="Spinner"
description="A simple animated loading indicator. Size it with w-/h- utilities and recolor it with text-* (it inherits currentColor). Source: src/components/Spinner.tsx."
>
<DsSection title="Sizes & color">
<DsPage title="Spinners">
<DsSection
title="Spinner"
description={
<>
A simple animated loading indicator. Size it with w-/h- utilities
and recolor it with text-* (it inherits currentColor).
<br />
Source:{' '}
<a
href="https://github.com/TanStack/tanstack.com/blob/main/src/components/Spinner.tsx"
target="_blank"
rel="noreferrer"
className="underline underline-offset-2 hover:text-text-primary"
>
src/components/Spinner.tsx
</a>
.
</>
}
>
<ComponentPreview
code={`<Spinner className="w-4 h-4" />
<Spinner />
Expand All @@ -35,7 +52,25 @@ function SpinnerPage() {

<DsSection
title="Headbanger"
description="A branded pixel-art loader — a 12-frame sprite animation on a canvas. Multi-color by design (it does not inherit currentColor); size it with w-/h- utilities. Holds on the first frame when prefers-reduced-motion is set. Source: src/components/ds/ui/PixelSpinner.tsx."
description={
<>
A branded pixel-art loader with a 12-frame sprite animation on a
canvas. Multi-color by design (it does not inherit currentColor);
size it with w-/h- utilities. Holds on the first frame when
prefers-reduced-motion is set.
<br />
Source:{' '}
<a
href="https://github.com/TanStack/tanstack.com/blob/main/src/components/ds/ui/PixelSpinner.tsx"
target="_blank"
rel="noreferrer"
className="underline underline-offset-2 hover:text-text-primary"
>
src/components/ds/ui/PixelSpinner.tsx
</a>
.
</>
}
>
<ComponentPreview
code={`<PixelSpinner className="w-8 h-8" />
Expand Down
Loading