Rendyn

Component library

189 components

Interaction

Highlighter

Highlighter adds an annotation around its children with selectable action and timing.

Interactive exampleReact Tailwind CSS

Practical React example

Emphasize a short phrase while leaving the text itself intact.

Before you copy and paste

Match the imported component’s client or server rendering boundary before using the example. Copy components/magicui/highlighter.tsx and its returned support files from the Code tab; preserve the project-relative paths.

Listed package dependencies: rough-notation.

Use the Code tab for the component files and installation instructions, then adapt the imports in this example to your project.

Emphasize a short phrase while leaving the text itself intact

// Usage adapted from Magic UI's pinned MIT source.
// Copyright (c) Magic UI. See ./LICENSES.md.
'use client';

import { Highlighter } from "@/components/magicui/highlighter"

export function ComponentExample() {
  return (
    <p>
  The{" "}
  <Highlighter action="underline" color="#FF9800">
    Magic UI Highlighter
  </Highlighter>{" "}
  makes important{" "}
  <Highlighter action="highlight" color="#87CEFA">
    text stand out
  </Highlighter>{" "}
  effortlessly.
</p>
  );
}

Usage example adapted from Magic UI's pinned MIT source. Retain the source licence notices when copying.

Use it for supporting emphasis and choose color and padding that preserve readable text. Keep layout changes in mind when annotated text wraps.

Customization

HighlighterProps.children
Required; React.ReactNode.
HighlighterProps.action
Optional; AnnotationAction.
HighlighterProps.color
Optional; string.
HighlighterProps.strokeWidth
Optional; number.
HighlighterProps.animationDuration
Optional; number.
HighlighterProps.iterations
Optional; number.
HighlighterProps.padding
Optional; number.
HighlighterProps.multiline
Optional; boolean.
HighlighterProps.isView
Optional; boolean.

Integration notes

  • A highlight is decoration, not a semantic heading or proof of a verified claim.
  • Check reduced motion, text zoom and repeated layout updates after fonts load.

Component source: Magic UI documentation . These examples describe the version imported into Rendyn. Upstream APIs may have changed; retain the source licence notices when adapting the code.

Better with your agent

Give your agent taste.

The best way to use Rendyn is through MCP. Let your agent find the right component, compare previews and bring the source into your project.

All components are free. Sign up only to connect MCP.

Connect to MCP