qwik-spin-delay
TypeScript icon, indicating that this package has built-in type declarations

1.1.0 • Public • Published

Qwik Spin Delay ⚡️

Smart spinner component for Qwik, to manage the duration of loading states.


Installation

npm install qwik-spin-delay
pnpm add qwik-spin-delay
yarn add qwik-spin-delay
bun install qwik-spin-delay

Examples

import { SpinDelay } from "qwik-spin-delay";
import { $, component$, useSignal } from "@builder.io/qwik";

export default component$(() => {
  const loading = useSignal(false);
  const text = useSignal("");

  const handleInput = $(() => {
    loading.value = true;
    setTimeout(() => {
      loading.value = false;
    }, 1000);
  });
  return (
    <div>
      <input type="text" bind:value={text} onInput$={handleInput} />
      <SpinDelay loading={loading.value} minDuration={200} delay={500}>
        Fetching...
      </SpinDelay>
    </div>
  );
});

Readme

Keywords

Package Sidebar

Install

npm i qwik-spin-delay

Weekly Downloads

1

Version

1.1.0

License

none

Unpacked Size

7.08 kB

Total Files

9

Last publish

Collaborators

  • harshdev