> To build a Wix site agentically, or add Wix features like bookings or a store to a site you already have, follow https://www.wix.com/headless/skill.md
> 
> Portal Navigation:
> 
> - Append `.md` to any URL under `https://dev.wix.com/docs/` to get its markdown version.
> - Pages are either content pages (article or reference text) or menu pages (a list of links to child pages).
> - To get a menu page, truncate any URL to a parent path and append `.md` (e.g. `https://dev.wix.com/docs/sdk.md`, `https://dev.wix.com/docs/sdk/core-modules.md`).
> - If a reference page seems to be missing its schema (parameters, return types, or type definitions), append `?schema=true` to its `.md` URL (e.g. `https://dev.wix.com/docs/contexts/contexts/stores/category-info/use-category-info-context.md?schema=true`).
> - Top-level index of all portals: https://dev.wix.com/docs/llms.txt
> - Full concatenated docs: https://dev.wix.com/docs/llms-full.txt

## Resource: Loader Component

## Article: Loader Component

## Article Link: https://dev.wix.com/docs/wix-design-system/components/feedback/loader-component.md

## Article Content:

# Loader

_Components/Feedback_

Interactive docs page: <https://wix-pages.com/design-system-documentation/#/component/loader>

## Overview

```jsx
<Box align="center">
  <Loader />
</Box>;
```

Loader is used to show users when an action is being processed.

### Do

- Use to show that the requested action has started and will be completed soon, like changes on a page being saved.
- Use when task completion time is unknown.
- Place in the vertical and horizontal center of a layout.

### Don't

- Don't use for an initial load of page content when you know how the final result will look. Use `<Skeleton/>` instead.
- Don't use for processes that have a detected completion time or require a long time to complete. Use `<CircularProgressBar/>` or `<LinearProgressBar/>` instead.
- Don't show multiple loaders on the page at a time. Use `<Skeleton/>` instead.

### Feature examples

#### Size

Adjust loader size using the `size` prop. It supports 4 sizes:

- `large` - use for a full page, like when saving applied changes.
- `medium` (default) - use for a specific area inside of a page.
- `small` - use in larger components, like a table or a modal.
- `tiny` - use in smaller components, like a button.

```jsx
<StorybookComponents.Stack flexDirection="column" gap="48px">
  <Loader size="large" />
  <Loader size="medium" />
  <Loader size="small" />
  <Loader size="tiny" />
</StorybookComponents.Stack>;
```

#### Color

Change the colors of the loader circle with the `color` prop. There are 2 color options:

- `blue` (default) - use on white and light grey backgrounds.
- `white` - use on dark backgrounds.

```jsx
<StorybookComponents.Stack flexDirection="column">
  <Box backgroundColor="D80" align="center" padding="SP4">
    <Loader color="blue" />
  </Box>
  <Box backgroundColor="D10" align="center" padding="SP4">
    <Loader color="white" />
  </Box>
</StorybookComponents.Stack>;
```

#### Status

`status` defines the current state of the `Loader` indicator.

- `loading`: shows an active loading state.
- `success`: shows a successful completion state.
- `error`: shows a failed/error state.

```jsx
() => (
  <Box gap="20px" direction="vertical">
    <Loader
      status="loading"
      text="Loading data..."
      statusMessage="Request is in progress"
    />

    <Loader status="success" text="Completed" statusMessage="Data loaded" />

    <Loader status="error" text="Failed" statusMessage="Something went wrong" />
  </Box>
);
```

#### Status message

Show the process status using the `statusMessage` prop. The message is displayed when a user mouse hovers over the loader.

_Note:_ users navigating with a keyboard will not be able to see the message.

```jsx
<StorybookComponents.Stack flexDirection="column" padding="48px">
  <Loader statusMessage="Uploading" />
</StorybookComponents.Stack>;
```

#### Text

Add a descriptive label below a loader with the `text` prop. Use it to explain what is happening when additional info is required.

```jsx
<StorybookComponents.Stack flexDirection="column" padding="48px">
  <Loader text="Loading..." />
</StorybookComponents.Stack>;
```

### Common use case examples

#### Load more items

Use loader to indicate that more items are being loaded to a list as a user scrolls down a component or layout, e.g., inside a `<Table/>`.

```jsx
() => {
  const containerRef = React.useRef(null);
  const [container, setContainer] = React.useState(null);
  const data = Array.from(Array(10).keys()).map(() => ({
    image: <Image width="42px" height="42px" />,
  }));

  const [records, setRecords] = React.useState(data);

  const columns = [{ title: '', render: (row) => row.image }];

  const fetchMoreData = () =>
    new Promise((resolve) => {
      setTimeout(() => setRecords([...records, ...data]), 2000);
    });

  React.useEffect(() => {
    setContainer(containerRef);
  }, []);

  return (
    <div style={{ maxHeight: '360px', overflowY: 'scroll' }} ref={container}>
      <Card stretchVertically={true} hideOverflow>
        <Table
          data={records}
          columns={columns}
          rowVerticalPadding="tiny"
          loadMore={fetchMoreData}
          infiniteScroll
          hasMore={records.length < 226}
          itemsPerPage={10}
          scrollElement={container && container.current}
          loader={
            <Box align="center" padding="24px 0px">
              <Loader size="small" />
            </Box>
          }
        >
          <TableToolbar>
            <TableToolbar.ItemGroup position="start">
              <TableToolbar.Item>
                <Text size="small">226 products</Text>
              </TableToolbar.Item>
            </TableToolbar.ItemGroup>
          </TableToolbar>
          <Table.Content />
        </Table>
      </Card>
    </div>
  );
};
```

#### Triggered action in process

Add a loader inside of a `<Button/>` to inform users that the action has started and is currently being processed.

```jsx
() => {
  const [isLoading, setIsLoading] = React.useState(false);
  return (
    <Box direction="vertical" align="center">
      <CustomModalLayout
        primaryButtonText={isLoading ? <Loader size="tiny" /> : 'Add Member'}
        secondaryButtonText="Cancel"
        onCloseButtonClick={() => {}}
        primaryButtonOnClick={() => {
          if (isLoading) {
            return;
          }

          setIsLoading(true);
          setTimeout(() => {
            setIsLoading(false);
          }, 2000);
        }}
        title="Add member"
      >
        <Box height="180px" />
      </CustomModalLayout>
    </Box>
  );
};
```

#### Save page changes

Use a loader to indicate that changes a user made on the page are being saved.

```jsx
() => {
  const [isModalOpened, setModalOpened] = React.useState(false);
  const [currentScreen, setCurrentScreen] = React.useState(null);

  const openModal = (screen) => {
    if (isModalOpened) {
      return;
    }

    setCurrentScreen(screen);
    setModalOpened(true);

    setTimeout(() => {
      setModalOpened(false);
    }, 2000);
  };
  const closeModal = () => setModalOpened(false);

  const renderModalContent = () => <Loader size="large" />;

  return (
    <Page height="760px">
      <Page.Header
        title="Basic Info"
        actionsBar={
          <Box gap="SP2">
            <Button skin="inverted">Cancel</Button>
            <Button onClick={() => openModal('desktop')}>Save</Button>
          </Box>
        }
      />
      <Page.Content>
        <Modal
          screen={currentScreen}
          isOpen={isModalOpened}
          onRequestClose={closeModal}
        >
          {renderModalContent()}
        </Modal>
        <Layout>
          <Cell>
            <Card>
              <Card.Header title="Program details" />
              <Card.Divider />
              <Card.Content>
                <Box height="360px" />
              </Card.Content>
            </Card>
          </Cell>
          <Cell>
            <Page.Footer divider>
              <Page.Footer.End>
                <Box gap="SP2">
                  <Button priority="secondary">Cancel</Button>
                  <Button onClick={() => openModal('desktop')}>Save</Button>
                </Box>
              </Page.Footer.End>
            </Page.Footer>
          </Cell>
        </Layout>
      </Page.Content>
    </Page>
  );
};
```

## Code

```jsx
import { Loader } from '@wix/design-system';
```

### Props

| Name | Type | Default | Description |
| --- | --- | --- | --- |
| `color` | `"blue" \| "white"` | — | Controls the skin of the loader. |
| `dataHook` | `string` | — | Applies a data-hook HTML attribute to be used in the tests. |
| `size` | `"small" \| "tiny" \| "medium" \| "large"` | — | Controls the size of the loader. |
| `status` | `"error" \| "loading" \| "success" \| "loadingWithErrors"` | — | Specifies the status of a loader. |
| `statusMessage` | `string` | — | Defines the message that explains the current status of the loader. The message is displayed on loader hover. If not given or empty, no tooltip is displayed. |
| `text` | `ReactNode` | — | Defines a text message to show below the loader. |

## Testkit

Import the driver matching your test environment:

```jsx
// UniDriver
import { LoaderUniDriver } from '@wix/design-system/dist/testkit/unidriver';

// Vanilla
import { LoaderTestkit } from '@wix/design-system/dist/testkit';

// Puppeteer
import { LoaderTestkit } from '@wix/design-system/dist/testkit/puppeteer';

// Testing Library
import { LoaderTestkit } from '@wix/design-system/dist/testkit/testing-library';
```

### Driver methods

| Method | Description |
| --- | --- |
| `component` | — |
| `getColor` | returns the loader color ('blue' or 'white') |
| `getText` | returns the element text |
| `hasText` | true if the element has text |
| `statusIndicatorExists` | true if the status indicator is rendered |
| `isLarge` | true when using the large loader |
| `isMedium` | true when using the medium loader |
| `isSmall` | true when using the small loader |
| `isTiny` | true when using the tiny loader |
| `isLoading` | true when loader is in loading status |
| `isLoadingWithErrors` | true when loader is in loading-with-errors status |
| `isError` | true when loader is in error status |
| `isSuccess` | true when loader is in success status |
| `getStatusMessage` | trigger the tooltip and returns the value of the tooltip message (async function) |
| `exists` | Checks whether the component found with the given data hook. |
| `element` | Gets the component root element. |
| `click` | Clicks on the component root element. |
| `base` | Returns UniDriver for the base element. |

## Changelog

- **1.339.0** (2026-10-19) — maintenance release, no component-specific changes
- **1.338.0** (2026-10-15) — maintenance release, no component-specific changes
- **1.336.0** (2026-10-13) — maintenance release, no component-specific changes
- **1.330.3** (2026-09-29) — maintenance release, no component-specific changes
- **1.329.0** (2026-09-24) — maintenance release, no component-specific changes
- **1.328.0** (2026-09-22) — maintenance release, no component-specific changes
- **1.325.0** (2026-09-17) — maintenance release, no component-specific changes
- **1.322.0** (2026-09-09) — maintenance release, no component-specific changes
- **1.310.0** (2026-08-10) — maintenance release, no component-specific changes
- **1.292.0** (2026-06-22) — maintenance release, no component-specific changes
- **1.278.0** (2026-05-08) — maintenance release, no component-specific changes
- **1.269.0** (2026-04-15) — feat: add loadingWithErrors status ([#16130](invalid-url)) — has visual changes
- **1.266.0** (2026-04-07) — maintenance release, no component-specific changes
- **1.260.1** (2026-03-23) — maintenance release, no component-specific changes
- **1.260.0** (2026-03-17) — maintenance release, no component-specific changes
- **1.256.3** (2026-02-17) — maintenance release, no component-specific changes
- **1.248.0** (2026-01-23) — fix: update loader-fill-default to standard-tertiary-readonly ([#15837](invalid-url))
- **1.228.0** (2025-11-18) — maintenance release, no component-specific changes
- **1.212.0** (2025-08-11) — maintenance release, no component-specific changes
- **1.169.0** (2025-03-10) — maintenance release, no component-specific changes
- **1.127.0** (2024-09-12) — breaking: tokenize ([#14093](invalid-url))
- **1.115.0** (2024-07-17) — maintenance release, no component-specific changes
- **1.102.0** (2024-04-16) — maintenance release, no component-specific changes
- **1.97.2** (2024-03-04) — maintenance release, no component-specific changes
- **1.93.0** (2024-02-08) — maintenance release, no component-specific changes
- **1.92.1** (2024-02-05) — maintenance release, no component-specific changes