Skip to main content
The Lumidot component is the core of the library, providing customizable animated dot patterns with various effects and styles.

Import

import { Lumidot } from 'lumidot';

Basic Usage

import { Lumidot } from 'lumidot';

export default function App() {
  return <Lumidot variant="blue" pattern="wave-lr" />;
}

With Custom Configuration

<Lumidot
  variant="emerald"
  pattern="spiral"
  rows={5}
  cols={5}
  glow={12}
  scale={1.5}
  duration={1}
  direction="ltr"
/>

Ref Support

The Lumidot component supports React refs through React.forwardRef:
const lumidotRef = useRef<HTMLSpanElement>(null);

<Lumidot ref={lumidotRef} variant="blue" />

Component Properties

For detailed information about all available props, see the Props documentation. For type definitions, see the Types documentation.

Accessibility

The component automatically includes accessibility attributes:
  • role="status" for screen readers
  • aria-label="Loading" to describe the loading state
  • Respects prefers-reduced-motion for sequence animations

Data Attributes

The component exposes several data attributes for styling and testing:
  • data-lumidot - Present on the root element
  • data-lumidot-pattern - Current pattern name
  • data-lumidot-variant - Current color variant
  • data-lumidot-rows - Number of rows
  • data-lumidot-cols - Number of columns
  • data-lumidot-direction - Animation direction
  • data-lumidot-mode - Either “sequence” or “wave”
  • data-lumidot-dot - Present on each dot element
  • data-lumidot-dot-active - Boolean indicating if dot is currently active

Build docs developers (and LLMs) love