---
title: "Mark"
description: "Highlights a phrase that the reader must not miss, or the words that match a search. It wraps with the text and does not move it."
url: https://gelatinui.com/components/mark
markdown_url: https://gelatinui.com/components/mark.md
access: free
install: "npx shadcn@latest add @gelatin-ui/mark"
registry_item: https://gelatinui.com/r/mark.json
version: "2026-11-08"
index: https://gelatinui.com/llms.txt
docs_index: https://gelatinui.com/docs/llms.txt
---

# Mark

> Highlights a phrase that the reader must not miss, or the words that match a search. It wraps with the text and does not move it.

Page: https://gelatinui.com/components/mark

## When to use it

Best for: A highlight on a phrase that the reader must notice in running text.

- Use it on a phrase that the reader must notice, or on the words that match a search.
- Use the `neutral` tone for emphasis and search matches.
- Use `success`, `warning`, `info`, or `destructive` only when the phrase is about that status.

## When not to use it

- To find and mark search terms in a text, use a [Highlight](https://gelatinui.com/components/highlight.md).
- For a status label on its own, use a [Badge](https://gelatinui.com/components/badge.md).

## Notes for agents

- It is the native `<mark>`, with no size of its own. The font comes from the text around it.
- The words must carry the meaning. Color alone does not.
- It has no hooks and no state, so it renders on the server.
- It takes no focus by itself. To make it a trigger, render it through a trigger with `role="button"`, such as `MenuTrigger nativeButton={false} render={<Mark />}`.

## Anatomy

```text
Mark
```

## API reference

### Mark

| Prop | Type | Default | Description |
| --- | --- | --- | --- |
| `tone` | `"destructive" \| "info" \| "neutral" \| "success" \| "warning"` |  |  |

## Styling

| Part | Slot | States | CSS variables | Tokens |
| --- | --- | --- | --- | --- |
| Mark | `mark` |  |  |  |

## Usage

Wrap the phrase. The mark takes the font of the text around it, and it wraps line by line.

```tsx title="vault-note.tsx"
import { Mark } from "@/components/ui/mark";

export function VaultNote() {
  return (
    <p>
      Back up the vault <Mark tone="warning">before you rotate the key</Mark>, or the old secrets are
      lost.
    </p>
  );
}
```

## Compose

Rules:

- Compose the parts (`compose-parts`): Build each item from its named parts as children, and pass your text and icons in as parts.
- Every state is designed (`every-state`): Give each view of data its loading, empty, and error states: a skeleton in the final layout, an `Empty` with an illustration and one next action, and an error that says what failed and how to retry.

## Add it

```bash
npx shadcn@latest add @gelatin-ui/mark
```

It adds 4 registry items: 3 files, 275 lines, and the npm packages `tailwind-merge`, `tailwind-variants`.

## For AI agents

- Every item, one file: https://gelatinui.com/llms.txt
- MCP server (`search_items`, `get_item`, `get_install_plan`): https://gelatinui.com/mcp

## Related

- [Highlight](https://gelatinui.com/components/highlight.md)
- [Badge](https://gelatinui.com/components/badge.md)
- [Typography](https://gelatinui.com/components/typography.md)

## Accessibility

It is the native `<mark>`. The words must carry the meaning, because color alone does not.

Alone it takes no focus. To make it a trigger, render it through a trigger with `role="button"`.
