Inline Loading
A small spinner or status icon with a label for a background save or check, inside a row, a card or beside a button.
Preview
Mirrored is the same English content laid out right to left: it separates a mirroring bug from a translation one.
PreviewCode
EnglishMirroredArabic
LTR →
Installation
Add the component
npx ritla add inline-loadingAlso works with shadcn:
npx shadcn@latest add @ritla/inline-loadingDependencies it brings
@phosphor-icons/reactOr copy by hand
Installing by hand copies the component's source into your project. The source comes with a Ritla UI license, so the CLI is the short way to the same files.
Usage
import { InlineLoading } from "@/components/ui/inline-loading";<InlineLoading status="loading">Saving changes…</InlineLoading>API reference
InlineLoading
| Prop | Type | Default | Description |
|---|---|---|---|
status | "loading" | "success" | "error" | "loading" | Figma's Status. |
children | ReactNode | None | Figma's Label. |
hideLabel | boolean | false | Figma's Show label off: the label stays for screen readers. |
Accessibility
ARIA
- A polite
role="status", so each change is announced. - For a whole screen use the Spinner or Skeleton.
Arabic and RTL notes
Mirrors
- The icon starts the line.
Does not mirror
- The check doesn't mirror.
- Numerals
- It holds no numbers.
- Arabic typography
body-14.