# Loader

**Path:** Components/Feedback

[Back to Documentation Index](http://rubicblazor.skyconis.com/docs.md)

---

Loader

 RbLoader coordinates loading feedback with content rendering. It can fully replace content until data is ready,
 or keep the content mounted and draw a loading overlay on top with AlwaysRenderContent .

 Basic Usage

 Toggle between loading state and ready content with the Ready parameter.

 Show code

 Ready 

 Always Render Content

 Keep the content visible and show the loader as an overlay while background work continues.

 Show code

 Ready 

 Customer Tickets 
 24 items 

 Payment reconciliation is pending final confirmation.

 Arabic localization review was completed this morning.

 Supplier import job finished with 2 warnings.

 Custom Loading Content

 Replace the default spinner with your own loading message or progress UI.

 Show code

 Ready 

 Preparing workspace 
 Draft data and validation summaries are being collected. 

 LoadAsync Helper

 Drive a complete simulated reload flow through the component reference and LoadAsync .

 Show code

 Reload Simulated Data 

 Last loaded value: A-1024 

 Live Snapshot

 This block stays mounted while LoadAsync simulates a refresh cycle.

 Snapshot token: A-1024 

 API

 RbLoader

 A loading-state wrapper that either replaces child content or overlays it with a loading surface.

 Ready / ReadyChanged

 Controls whether the wrapped content is considered ready for display.

 Parameters

 bool Ready 

 Set false while data is loading and true when the content is ready.

 EventCallback<bool> ReadyChanged 

 Raised after SetReadyAsync updates the component state.

 AlwaysRenderContent

 Keeps child content mounted even while the loading overlay is active.

 Parameters

 bool AlwaysRenderContent = false

 Useful when layout continuity matters or when partially loaded content should remain visible.

 LoadingContent

 Optional custom loading UI that replaces the built-in spinner.

 Parameters

 RenderFragment LoadingContent = null

 Render custom text, alerts, skeletons, or progress indicators here.

 ChildContent

 The wrapped content template.

 Parameters

 RenderFragment<RbLoader> ChildContent 

 Receives the current loader instance as template context when needed.

 SetReadyAsync(bool isReady)

 Imperatively updates the ready state and triggers ReadyChanged .

 Parameters

 bool isReady 

 New ready flag to apply.

 Return

 Task 

 Completes after the render request and callback dispatch are queued.

 LoadAsync(Func<Task> loader)

 Convenience helper that wraps an async operation with automatic loading state transitions.

 Parameters

 Func<Task> loader 

 Async work to execute between the internal ready=false and ready=true transitions.

 Return

 Task 

 Completes after the wrapped loader function finishes and ready state is restored.

 ✕

 Contents
