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;
classNamesets another size or colour. - It renders inside an
outputlabeled “Loading” for screen readers.
API
Parts: Root. Props go to the Tabler IconLoader2 icon.