Skip to content

Loading Overlay

FeedbackMIT
View in Storybook

Full-area blocking spinner overlay for async views — drop-in for any container.

bun add @otfdashkit/ui

Preview

Loading Overlay
Loading Storybook preview…

Code

import { LoadingOverlay } from '@otfdashkit/ui'

export function Example() {
  return (
    <LoadingOverlay loading text="Saving changes...">
      <div className="rounded border border-[hsl(var(--border))] bg-[hsl(var(--card))] p-8 text-center text-sm text-[hsl(var(--muted-foreground))]">
        Content behind the overlay
      </div>
    </LoadingOverlay>
  )
}

Free with the SDK. This component ships in @otfdashkit/ui under the MIT license.

Props

Props declared in the LoadingOverlay source. Inherited HTML attributes are not listed.

PropTypeDefaultDescription
loadingrequiredboolean
childrenReactNode
classNamestring
fullPageboolean
textstring