Skip to content
OpenPerf
Esc
↑↓navigate↵open⌘Jpreview
On this page

Spinner

Shows that something is loading where a skeleton doesn't fit.

import { Spinner } from "@openperf/deft";

import { Preview } from "../../src/Preview";

export default function SpinnerBasic() {
  return (
    <Preview>
      <Spinner.Root />
    </Preview>
  );
}
  • Button shows it on its own while loading. Elsewhere prefer a Skeleton in the shape of the content.
  • It takes the icon size and the current text colour; className sets another size or colour.
  • It renders inside an output labeled “Loading” for screen readers.

API

Parts: Root. Props go to the Tabler IconLoader2 icon.

Was this page helpful?