Loading

Pro

Loading conditionally shows a spinner or custom loader while loading is true, with default (replace) and cover (overlay) modes.

Loading State:

Installation

Add this component with the NateUI CLI.

npx @nateui/cli@latest add Loading

Examples

API

PropDescriptionTypeDefault
loadingWhether the component is in a loading state.booleanfalse
typeLoading display mode. default replaces children; cover overlays on top.'default' | 'cover''default'
asElementWrapper element type.ElementType'div'
customLoaderCustom loader element instead of the default Spinner.ReactNode—
spinnerClassExtra CSS class for the default Spinner.string—
childrenContent to display when not loading.ReactNode—
classNameAdditional CSS classes for the wrapper.string—