Skip to main content

Documentation Index

Fetch the complete documentation index at: https://mintlify.com/ragaeeb/dyelight/llms.txt

Use this file to discover all available pages before exploring further.

Installation

DyeLight is available as an npm package and can be installed using your preferred package manager.

Install the package

npm install dyelight

Peer dependencies

DyeLight requires React 19 or higher. Make sure you have the following peer dependencies installed:
package.json
{
  "dependencies": {
    "react": "^19.2.4",
    "react-dom": "^19.2.4"
  }
}
DyeLight is built with React 19 and takes advantage of modern React features. If you’re using an older version of React, you’ll need to upgrade to use DyeLight.

Engine requirements

If you’re developing or building DyeLight from source, note the engine requirements:
  • Node.js: 24.x or higher
  • Bun: 1.3.9 or higher (if using Bun)
These requirements only apply if you’re contributing to DyeLight or building from source. Regular usage only requires React 19+.

TypeScript setup

DyeLight is written in TypeScript and includes comprehensive type definitions out of the box. No additional setup is required - types are automatically available when you import the package.
import { DyeLight, HighlightBuilder } from 'dyelight';
import type { DyeLightRef, CharacterRange } from 'dyelight';

Verify installation

To verify that DyeLight is installed correctly, try importing it in your project:
import { DyeLight } from 'dyelight';

function App() {
  return (
    <DyeLight
      defaultValue="Hello DyeLight!"
      className="w-full p-2 border rounded"
    />
  );
}
If you see a functional textarea, you’re all set!

Next steps

Quick start

Learn how to use DyeLight with real examples