open-index/open-npm huggingface dataset:
npm package: @kvass/loader
Description: Loader component for Kvass
Author: carsten@kvass.no
Latest version: 1.0.0

# @kvass/loader

Loader component for Kvass

```sh
npm install @kvass/loader
```

## Props

- [value](#prop-value)
- [theme](#prop-theme)
- [message](#prop-message)
- [delay](#prop-delay)

<h3 id="prop-value">value</h3>

Type: `Boolean | Promise`

If it's a boolean, `true` triggers the loading state.
If you pass in a promise, the loading state will automatically trigger and finish. In the case of an error, it throws.

<h3 id="prop-theme">theme</h3>

Type: `String`

The visual style of the loader.

- **default** hides its children.
- **overlay** lays on top of its children.

<h3 id="prop-message">message</h3>

Type: `String`

Loading message.

<h3 id="prop-delay">delay</h3>

Type: `Number`

The amount of time needed to pass before the loading state triggers. Only loading taking longer than this delay will trigger the loading state.

## Slots

- [default](#slot-default)
- [loader](#slot-loader)
- [message](#slot-message)

<h3 id="slot-default">default</h3>

Content being loaded.

<h3 id="slot-loader">loader</h3>

Will be shown while loading. Default is a spinner.

<h3 id="slot-message">message</h3>

Will be shown while loading.

## License

This project is licensed under the [MIT license](LICENSE)