Dot Matrix Text
Text rendered as a configurable animated dot matrix.
<script lang="ts">
import { DotMatrixText } from "coss-svelte";
</script>
<DotMatrixText text="HELLO" dot={4} gap={1} motion="wave" />
Installation
Install the component package, shared coss-svelte theme, and Bits UI peer.
npm install coss-svelte @coss-svelte/theme bits-uiUsage
Import the Svelte component exports directly from the package.
import { DotMatrixText } from "coss-svelte";Anatomy
Dot Matrix Text exposes a single component export for the current implementation.
API Reference
DotMatrixText
Text rendered as a configurable animated dot matrix.
| Prop | Type | Default | Description |
|---|---|---|---|
text | string | - | Text to render; unsupported characters appear as a box. |
dot | string | number | 8 | Dot diameter as pixels or a CSS length. |
gap | string | number | 2 | Gap between dots as pixels or a CSS length. |
color | string | "currentColor" | CSS color of each dot. |
motion | DotMotion | "reveal" | Reveal, wave, scan, or still motion. |
duration | number | 2.4 | Animation duration in seconds. |
stagger | number | 0.045 | Delay between neighbouring dots in seconds. |
playing | boolean | true | Whether animation is enabled. |
label | string | text | Accessible label; pass an empty string for decoration. |
Inherits from Svelte <div> attributes.
Implementation Details
- Status
- Experimental
- Foundation
- native
- Category
- Feedback & Status
- Particles
- 1
Status
Render accessible bitmap text with configurable dots, motion, and reduced-motion support.