Skip to content

Component/Scan

A line sweeping down a page and back up.

Speed1800ms
Opacity100%
import { Scan } from "loading-dev"; export function ScanDemo() {  return <Scan size={48} />;}

Size

Sets the spinner’s dimensions in pixels. The default value is 20

import { Scan } from "loading-dev"; export function ScanSize() {  return (    <div className="flex items-center gap-6">      <Scan size={16} />      <Scan size={24} />      <Scan size={40} />    </div>  );}

Custom Classes

You can use a custom className in case you need to tweak the spinner in a specific way that the library doesn’t provide.

import { Scan } from "loading-dev"; export function ScanClassName() {  return <Scan className="opacity-40" size={32} />;}

Color

The loader inherits currentColor from the parent by default. You can tint it in any way you want. It accepts any valid CSS color.

import { Scan } from "loading-dev"; export function ScanColor() {  return <Scan color="#f97316" size={32} />;}

Duration

Sets the speed in ms. Higher values are slower, smaller values are faster.

import { Scan } from "loading-dev"; export function ScanDuration() {  return <Scan duration={3600} size={32} />;}

State

Pauses or resumes the animation and exposes the state of the spinner.

import { Scan } from "loading-dev"; export function ScanPlayState() {  return <Scan playState="paused" size={32} />;}