Loading

A Loading component is a UI element that indicates to users that a process is ongoing, such as data fetching, page loading, or background tasks. It typically features visual indicators like spinners, progress bars, or animated icons to convey that the application is busy and to enhance the user experience by preventing confusion or frustration during waiting periods.

Demo

Rendered live, with the same build of the library you install.

Usage

Loading.tsx
import { NLoading } from '@nayan-ui/react';
const Loading = () => {
return (
<div>
<div className="flex items-center gap-4">
<NLoading size="sm" />
<NLoading size="md" />
<NLoading size="lg" />
</div>
</div>
);
};
export default Loading;

Attributes

4 props
NameTypeDefaultDetails
classNamestring' 'You can customise by passing tailwind classes.
aria-labelstringOptionalARIA label for accessibility.
size'sm' | 'md' | 'lg' | 'xl''md'Size of the loading spinner.
color'current' | 'accent' | 'success' | 'warning' | 'danger''current'Color of the loading spinner.

Tags

Other components solving nearby problems.