Skip to content

Loader

The Loader component provides an easy way to display a visually appealing, animated loading indicator to users, improving the perceived performance of your application.

Since OrbitUI components are copied directly into your project, you’ll add the Loader component using the OrbitUI CLI:

Terminal window
npx orbitkit@latest add loader

Import the Loader component and use it wherever you need a loading indicator. You can customize its appearance using the type and class props.

The Loader component includes a comprehensive set of 46 animated icons. You can see all available types in the source code definition of LoaderType within your project.

Using the different type.

specific Tailwind color class

Setting a larger size.

The Loader component accepts the following props for customization. It is rendered as an inline SVG element.

PropTypeDefault
typeLoaderType (Union of 46 string types)180-ring
sizenumber32
  • type: Specifies the specific animated SVG icon to render.
  • size: Sets the width and height of the SVG element in pixels.

This component accepts all the standard HTML attributes that a <svg> element would.

The SVG animated icons used in the OrbitUI Loader component are based on the excellent work by Utkarsh Verma.