Spinner

The loading arc from the CRM's Button, shared by every busy control. It stops spinning for people who ask for reduced motion.

BetaReady to use. Its API can still change in a minor release; the changelog says when.

import { Spinner } from "@leap-crm/design-system";

Playground

Change a prop and the component follows. Its code is under Props.

Props

label
className

Best practices

When to use it, and the rules that apply in particular places.

GuidancePractice
DoSet label when the spinner stands alone, like "Loading contacts", so a screen reader hears that something is loading.
DoSet its colour on the parent. It draws in currentColor, so it matches the text around it in both themes.
Don'tPut a spinner inside a Button by hand. Return a Promise from onClick, or set loading, and the button turns its icon into the spinner and back.
Don'tUse it while a list or panel loads its content. Use Skeleton, so the layout holds its shape and nothing jumps when the content arrives.
Don'tUse it when the amount done is known, like intake questions answered. Use Progress.

Props

Also takes every SVG attribute.

PropTypeDefaultDescription
labelstring—Name it when it stands alone, so screen readers hear it. Leave it out inside a control that already says it's busy.

Code

What the playground shows, ready to copy.

import { Spinner } from "@leap-crm/design-system";

<Spinner label="Loading" />