# Prism Text

> Letters cut from iridescent glass: a soap-film spectrum flows through them and, as the cursor nears, they split into red and blue fringes like light through a prism.

Category: Text · MotionKit Plus · Updated 2026-11-10 · Live demo: https://www.motionkitui.com/components/prism-text

## When to use it

Holographic and creative brands, product names, launch headlines and anywhere a single word should feel like light.

## How it works

The letters are clipped to two backgrounds: a pale spectrum twice as wide as the text that slides across on a slow loop, and a white fade along their tops that reads as a bright glass edge. The red and blue fringes are hard drop shadows of the letters, offset in opposite directions. Their offset is held in CSS variables that the pointer sets, along the line from the text's centre towards the pointer and stronger the nearer it gets, so the light splits the way it would through a prism. Nothing re-renders as the pointer moves.

## Installation

Part of MotionKit Plus (https://www.motionkitui.com/pricing). Subscribers install it with `npx shadcn@latest add @motionkit/prism-text` after adding their registry token from https://www.motionkitui.com/account.

## Props

| Prop | Type | Default | Description |
| --- | --- | --- | --- |
| `children` | `ReactNode` |  | The text. |
| `split` | `number` | `6` | Largest red and blue split, in px. |
| `duration` | `number` | `8` | Seconds for the colour to flow across once. 0 holds it still. |
| `interactive` | `boolean` | `true` | Let the fringes respond to the pointer. |
| `as` | `ElementType` | `"span"` | Element to render, e.g. h1. |

## Accessibility

- **Keyboard: Not applicable.** Text, not a control.
- **Screen readers: Pass.** It's your real text, read normally; the colour and fringes are only styling.
- **Reduced motion: Pass.** With reduced motion on, the colour stops flowing; the fringes still follow the pointer, which only moves when you do.
- **Colour contrast: Pass.** The pale spectrum stays light throughout: its darkest stop measures 9.2:1 on the site's dark background.
