initialLoader

Options for a loader while your form initializes

Overview

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

Example

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 `onboarding` Feathery form
  return <Form
    formName='onboarding'
    // 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.

PropTypeDescription

show

optional boolean

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.

loader

optional string | JSX

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. <div class="loader" />, that can be styled with your own CSS.

initialContainerHeight

optional string

Defaults to min-content. This can be any CSS measurement value, i.e. 100vw, 300px, or max-content.

initialContainerWidth

optional string

Defaults to 100%. This can be any CSS measurement value, i.e. 100vw, 300px, or max-content.

Last updated