Skip to content

Loading Spinner

Pure CSS loading spinner utilities for @bnotk/dsx.

Live Preview
<link rel="stylesheet" href="@bnotk/dsx/css/loading-spinner.css">

Or use the full bundle:

<link rel="stylesheet" href="@bnotk/dsx/css/index.css">
ClassPurpose
.dsx-spinnerBase spinner
.dsx-spinner--sm / --lg / --xlSize variants
.dsx-spinner--whiteWhite spinner for dark backgrounds
.dsx-spinner--highlightHighlight-colored spinner
.dsx-spinner-wrapperInline label + spinner layout
  • The spinner is a bordered circle with only the top border colored.
  • Animation uses @keyframes dsx-spin at 0.8s linear infinite.
  • Size variants change width, height, and border width.
  • Wrapper text uses var(--ds2-font-size-sm) and var(--ds2-color-grey-5).
<div class="dsx-spinner-wrapper" role="status" aria-live="polite">
<span class="dsx-spinner dsx-spinner--highlight" aria-hidden="true"></span>
<span>Loading customer data…</span>
</div>
  • Pair the spinner with text or an accessible live region when loading matters.
  • Mark purely decorative spinners with aria-hidden="true".
  • Avoid relying on animation alone to explain what is happening.