# Inline Highlight

Animates one word inside a sentence from a base color to a brand color.

> For the complete documentation index, see [llms.txt](/llms.txt). Markdown variants are available by appending `.md` to any URL or sending an `Accept: text/markdown` header. An agent skill is available at [/.well-known/agent-skills/site-skill.md](/.well-known/agent-skills/site-skill.md).

## Installation

<TabsTrigger value="cli">Command</TabsTrigger>
<TabsTrigger value="manual">Manual</TabsTrigger>

```bash
npx shadcn@latest add @framecn/inline-highlight
```

<Step>Copy and paste the following code into your project.</Step>

<Step>Update the import paths to match your project setup.</Step>

## Usage

```tsx
import { InlineHighlight } from "@/components/framecn/inline-highlight";
```

```tsx
<InlineHighlight before="value" highlight="value" />
```

## API Reference

### InlineHighlight

| Prop               | Type     | Default     |
| ------------------ | -------- | ----------- |
| `before`           | `string` | `-`         |
| `highlight`        | `string` | `-`         |
| `after`            | `string` | `""`        |
| `baseColor`        | `string` | `"#171717"` |
| `highlightColor`   | `string` | `"#ff5e3a"` |
| `fontSize`         | `number` | `48`        |
| `fontWeight`       | `number` | `600`       |
| `speed`            | `number` | `1`         |
| `fps`              | `number` | `30`        |
| `durationInFrames` | `number` | `90`        |
| `className`        | `string` | `-`         |

## Notes

  Pass an array of word indices to `highlightWords` to animate multiple words.
  The animation sequences through each word in the array.