# tholman/cursor-effects architecture

> Architecture diagram of the GitHub repository tholman/cursor-effects, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-10-12). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/tholman/cursor-effects
- Repository: https://github.com/tholman/cursor-effects

## Overview

90s Cursor Effects is a browser JavaScript library of configurable cursor animations. A page imports an effect from the public exports, creates an instance, and the effect renders a cursor-following visual; instances can be destroyed. The effects cover particle trails, character/emoji motion, and clock-like or text-based displays. The README documents reduced-motion support and element targeting. Source excerpts are partial, so the graph shows the export surface and documented canvas workflow, not unverified event-handler links for every effect.

Main entry points: [`src/index.js`](https://github.com/tholman/cursor-effects/blob/master/src/index.js) (Effect Exports), [`src/antsCursor.js`](https://github.com/tholman/cursor-effects/blob/master/src/antsCursor.js) (Ants Cursor), [`src/bubbleCursor.js`](https://github.com/tholman/cursor-effects/blob/master/src/bubbleCursor.js) (Bubble Cursor), [`src/fairyDustCursor.js`](https://github.com/tholman/cursor-effects/blob/master/src/fairyDustCursor.js) (Fairy Dust)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_api["Public API"]
  node_exports["Effect Exports<br/>[index.js]"]
  node_canvas["Canvas Overlay"]
end

subgraph group_particles["Particle Effects"]
  node_ants["Ants Cursor<br/>[antsCursor.js]"]
  node_bubbles["Bubble Cursor<br/>[bubbleCursor.js]"]
  node_fairy["Fairy Dust<br/>[fairyDustCursor.js]"]
  node_snowflake["Snowflake Cursor<br/>[snowflakeCursor.js]"]
  node_emoji["Emoji Rain<br/>[emojiCursor.js]"]
end

subgraph group_motion["Cursor Motion"]
  node_ghost["Ghost Following<br/>[ghostCursor.js]"]
  node_trailing["Trailing Cursor<br/>[trailingCursor.js]"]
  node_following["Following Dot"]
  node_springy["Elastic Emoji"]
end

subgraph group_displays["Text And Time"]
  node_character["Character Cursor<br/>[characterCursor.js]"]
  node_clock["Clock Cursor<br/>[clockCursor.js]"]
  node_textflag["Text Flag<br/>[textFlag.js]"]
  node_rainbow["Rainbow Cursor<br/>[rainbowCursor.js]"]
end

node_page(("Web Page"))

node_page -->|"imports effects"| node_exports
node_exports -->|"exports"| node_ants
node_exports -->|"exports"| node_bubbles
node_exports -->|"exports"| node_fairy
node_exports -->|"exports"| node_snowflake
node_exports -->|"exports"| node_emoji
node_exports -->|"exports"| node_ghost
node_exports -->|"exports"| node_trailing
node_exports -->|"exports"| node_following
node_exports -->|"exports"| node_springy
node_exports -->|"exports"| node_character
node_exports -->|"exports"| node_clock
node_exports -->|"exports"| node_textflag
node_exports -->|"exports"| node_rainbow
node_ants -->|"renders on"| node_canvas
node_bubbles -->|"renders on"| node_canvas
node_fairy -->|"renders on"| node_canvas
node_snowflake -->|"renders on"| node_canvas
node_emoji -->|"renders on"| node_canvas
node_ghost -->|"renders on"| node_canvas
node_trailing -->|"renders on"| node_canvas
node_springy -->|"renders on"| node_canvas
node_character -->|"renders on"| node_canvas
node_clock -->|"renders on"| node_canvas

click node_exports "https://github.com/tholman/cursor-effects/blob/master/src/index.js"
click node_ants "https://github.com/tholman/cursor-effects/blob/master/src/antsCursor.js"
click node_bubbles "https://github.com/tholman/cursor-effects/blob/master/src/bubbleCursor.js"
click node_fairy "https://github.com/tholman/cursor-effects/blob/master/src/fairyDustCursor.js"
click node_snowflake "https://github.com/tholman/cursor-effects/blob/master/src/snowflakeCursor.js"
click node_emoji "https://github.com/tholman/cursor-effects/blob/master/src/emojiCursor.js"
click node_ghost "https://github.com/tholman/cursor-effects/blob/master/src/ghostCursor.js"
click node_trailing "https://github.com/tholman/cursor-effects/blob/master/src/trailingCursor.js"
click node_following "https://github.com/tholman/cursor-effects/blob/master/src/followingDotCursor.js"
click node_springy "https://github.com/tholman/cursor-effects/blob/master/src/springyEmojiCursor.js"
click node_character "https://github.com/tholman/cursor-effects/blob/master/src/characterCursor.js"
click node_clock "https://github.com/tholman/cursor-effects/blob/master/src/clockCursor.js"
click node_textflag "https://github.com/tholman/cursor-effects/blob/master/src/textFlag.js"
click node_rainbow "https://github.com/tholman/cursor-effects/blob/master/src/rainbowCursor.js"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_exports,node_canvas toneBlue
class node_ants,node_bubbles,node_fairy,node_snowflake,node_emoji toneAmber
class node_ghost,node_trailing,node_following,node_springy toneMint
class node_character,node_clock,node_textflag,node_rainbow toneRose
class node_page toneIndigo
```

## Components

### Public API

- [Effect Exports](https://github.com/tholman/cursor-effects/blob/master/src/index.js): `src/index.js`
- **Canvas Overlay**

### Particle Effects

- [Ants Cursor](https://github.com/tholman/cursor-effects/blob/master/src/antsCursor.js): `src/antsCursor.js`
- [Bubble Cursor](https://github.com/tholman/cursor-effects/blob/master/src/bubbleCursor.js): `src/bubbleCursor.js`
- [Fairy Dust](https://github.com/tholman/cursor-effects/blob/master/src/fairyDustCursor.js): `src/fairyDustCursor.js`
- [Snowflake Cursor](https://github.com/tholman/cursor-effects/blob/master/src/snowflakeCursor.js): `src/snowflakeCursor.js`
- [Emoji Rain](https://github.com/tholman/cursor-effects/blob/master/src/emojiCursor.js): `src/emojiCursor.js`

### Cursor Motion

- [Ghost Following](https://github.com/tholman/cursor-effects/blob/master/src/ghostCursor.js): `src/ghostCursor.js`
- [Trailing Cursor](https://github.com/tholman/cursor-effects/blob/master/src/trailingCursor.js): `src/trailingCursor.js`
- [Following Dot](https://github.com/tholman/cursor-effects/blob/master/src/followingDotCursor.js): `src/followingDotCursor.js`
- [Elastic Emoji](https://github.com/tholman/cursor-effects/blob/master/src/springyEmojiCursor.js): `src/springyEmojiCursor.js`

### Text And Time

- [Character Cursor](https://github.com/tholman/cursor-effects/blob/master/src/characterCursor.js): `src/characterCursor.js`
- [Clock Cursor](https://github.com/tholman/cursor-effects/blob/master/src/clockCursor.js): `src/clockCursor.js`
- [Text Flag](https://github.com/tholman/cursor-effects/blob/master/src/textFlag.js): `src/textFlag.js`
- [Rainbow Cursor](https://github.com/tholman/cursor-effects/blob/master/src/rainbowCursor.js): `src/rainbowCursor.js`

### Other components

- **Web Page**

## Connections

- Web Page → Effect Exports: imports effects (evidence: `readme.md`)
- Effect Exports → Ants Cursor: exports (evidence: `src/index.js`)
- Effect Exports → Bubble Cursor: exports (evidence: `src/index.js`)
- Effect Exports → Fairy Dust: exports (evidence: `src/index.js`)
- Effect Exports → Snowflake Cursor: exports (evidence: `src/index.js`)
- Effect Exports → Emoji Rain: exports (evidence: `src/index.js`)
- Effect Exports → Ghost Following: exports (evidence: `src/index.js`)
- Effect Exports → Trailing Cursor: exports (evidence: `src/index.js`)
- Effect Exports → Following Dot: exports (evidence: `src/index.js`)
- Effect Exports → Elastic Emoji: exports (evidence: `src/index.js`)
- Effect Exports → Character Cursor: exports (evidence: `src/index.js`)
- Effect Exports → Clock Cursor: exports (evidence: `src/index.js`)
- Effect Exports → Text Flag: exports (evidence: `src/index.js`)
- Effect Exports → Rainbow Cursor: exports (evidence: `src/index.js`)
- Ants Cursor → Canvas Overlay: renders on (evidence: `src/antsCursor.js`)
- Bubble Cursor → Canvas Overlay: renders on (evidence: `src/bubbleCursor.js`)
- Fairy Dust → Canvas Overlay: renders on (evidence: `src/fairyDustCursor.js`)
- Snowflake Cursor → Canvas Overlay: renders on (evidence: `src/snowflakeCursor.js`)
- Emoji Rain → Canvas Overlay: renders on (evidence: `src/emojiCursor.js`)
- Ghost Following → Canvas Overlay: renders on (evidence: `src/ghostCursor.js`)
- Trailing Cursor → Canvas Overlay: renders on (evidence: `src/trailingCursor.js`)
- Elastic Emoji → Canvas Overlay: renders on (evidence: `src/springyEmojiCursor.js`)
- Character Cursor → Canvas Overlay: renders on (evidence: `src/characterCursor.js`)
- Clock Cursor → Canvas Overlay: renders on (evidence: `src/clockCursor.js`)
