> For the complete documentation index, see [llms.txt](https://docs.usegravity.app/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.usegravity.app/gravity-web/components/loader.md).

# Loader

The `Loader` component provides an infinite spinning animation for indicating loading states.

### Preview

<div align="left"><figure><img src="/files/ZLZabs6nyjx4Biuooe1v" alt="Gravity loader component" width="25"><figcaption></figcaption></figure></div>

## Usage

```javascript
import { Loader } from 'components/lib';

function MyComponent({ ...props }){
  return (
    <div>
      <Loader />
    </div>
  );
}
```

### Props

| Prop      | Description  | Required | Value            |
| --------- | ------------ | -------- | ---------------- |
| className | custom style | optional | SCSS or Tailwind |

### Notes

* The `Loader` component uses the `Icon` component from `'components/lib'` to display a loading icon.
* The `className` prop allows for custom styling to be applied.
