# initialLoader

### Overview

`initialLoader` allows you to configure a loader to show as your Feathery form first loads for your user.

### Example <a href="#usage" id="usage"></a>

```typescript
import { useRef } from 'react';
import { init, Form, FormContext } from '@feathery/react';
// You can use the default loader, or specify your own
import CustomLoader from './CustomLoader';

function App() {
  // Initialize Feathery
  init('SDKKey', 'support@feathery.io');

  // Show the `aBcDeF` Feathery form
  return <Form
    formId='aBcDeF'
    // Fetch the Feathery form context
    initialLoader={{
      show: true,
      loader: <CustomLoader />
    }}
  />
}
```

### initialLoader properties

Options for the loader as the form initializes. By default no loader will be shown while loading the form, unless the user is waiting on authentication.&#x20;

<table><thead><tr><th width="168.33333333333331">Prop</th><th>Type</th><th>Description</th></tr></thead><tbody><tr><td><code>show</code></td><td><code>optional boolean</code></td><td>By default no loader will be shown while loading the form, unless the user is waiting on authentication. If this is explicitly false then no loader will be shown in both cases. If true, loader will be shown for both cases.</td></tr><tr><td><code>loader</code></td><td><code>optional string | JSX</code></td><td>Defaults to a simple grey spinner. If using React SDK, accepts a JSX component. If using Javascript SDK, accepts a string of HTML, i.e. <code>&#x3C;div class="loader" /></code>, that can be styled with your own CSS.</td></tr><tr><td><code>initialContainerHeight</code></td><td><code>optional string</code></td><td>Defaults to <code>min-content</code>. This can be any CSS measurement value, i.e. <code>100vw</code>, <code>300px</code>, or <code>max-content</code>.</td></tr><tr><td><code>initialContainerWidth</code></td><td><code>optional string</code></td><td>Defaults to <code>100%</code>. This can be any CSS measurement value, i.e. <code>100vw</code>, <code>300px</code>, or <code>max-content</code>.</td></tr></tbody></table>


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.feathery.io/develop/react/api-guide/form/initialloader.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
