Loading icon

Communicates that an indeterminate operation is in progress.

On this page

This docs is LLM-friendly and available as clean Markdown.

Supported browser agents can also use WebMCP to search, read, and open these docs. Learn more

Usage

import { GlLoadingIcon } from "gitlab-ui-react/loading-icon";
<GlLoadingIcon label="Loading results" />

Default

Use a loading icon when the duration or completion percentage is unknown. Prefer a skeleton loader when the layout of incoming content is predictable.

Loading icon

Variants, sizes, and color

Use spinner for most loading states and dots where a compact animated treatment fits better. Choose a size that matches the surrounding content. The light color is intended for persistently dark backgrounds.

Variants, sizes, and color
Spinner
sm
md
lg
xl
Dots
sm
md
lg
xl

Accessibility

  • Set label or aria-label to describe what is loading rather than repeating a generic message when context is available.
  • The component uses role="status" by default so its label is announced without interrupting the current task.
  • Do not use animation as the only indication that content is unavailable; keep nearby controls disabled or provide explanatory text when needed.

API

Prop Description Default
variant Sets the indicator shape to spinner or dots. "spinner"
size Sets sm, md, lg, or xl. "sm"
color Uses the dark or light color treatment. "dark"
inline Renders a <span> root instead of a <div>. false
label Sets the status’s accessible name. "Loading"