# Magnifying glass

An isometric shadcn/ui no-results state: a line-drawn magnifying glass that sweeps a card of rows, enlarging what is under it, with copy and button as props.

> For the complete documentation index, see [llms.txt](/llms.txt). Markdown variants are available for the docs, pricing and about pages: append `.md` to the URL or send an `Accept: text/markdown` header (the home page answers the header too). An agent skill is available at [/.well-known/agent-skills/site-skill.md](/.well-known/agent-skills/site-skill.md).

## At a glance

- **Good for:** No search results and nothing-matches-your-filters screens; Empty filtered tables, lists and catalogues; Command palettes and pickers with no match; Help centres and docs search with nothing found
- **Category:** Data · **Type:** Empty states, Objects · **Style:** Isometric, Line, Flat, Dark mode
- **See it:** [Live preview](https://www.craftui.space/docs/illustrations/magnifying-glass) · [Screenshot](https://www.craftui.space/llms.md/preview/magnifying-glass.63252a15.jpg)

![Magnifying glass](https://www.craftui.space/llms.md/preview/magnifying-glass.63252a15.jpg)

## Install

```bash
pnpm dlx shadcn@latest add https://www.craftui.space/r/magnifying-glass.json
```

This is a paid item (ILL-RTRKJE): the install needs a craftUI plan or a purchase of it. Signed in, the docs page gives your personal install command. Plans: https://www.craftui.space/pricing

## Usage

```tsx
import MagnifyingGlass from "@/components/isometric/magnifying-glass";

export default function Page() {
  return <MagnifyingGlass />;
}
```

With no props it renders with demo content; pass your own through the props below.

## Props

| Prop | Type | Default | Description |
| --- | --- | --- | --- |
| `heading` | `string` | `"No results found"` | Heading under the card, up to about 28 characters. An empty string hides it. |
| `description` | `string` | `"Try a different search, or clear your filters to see everything."` | The line under the heading: one or two short sentences. An empty string hides it. |
| `actionLabel` | `string` | `"Clear filters"` | Label of the button, up to about 20 characters. An empty string hides the button. |
| `onAction` | `() => void` | — | Called when the button is clicked. |
| `children` | `ReactNode` | — | Your own actions under the copy (a link, two buttons), in place of the built-in button. |
| `tone` | `IsoTone` | `"primary"` | Brand colour: a theme token name (primary, chart-2…) or any CSS colour. It shows on the collar of the glass's handle; the rest stays neutral. |
| `variant` | `IsoVariant` | `"ink"` | "ink" (default): a fine outline with a whisper of shading on the walls. "line": the outline alone, faces the colour of the page. "soft", "duotone" and "solid" are the lit, coloured looks. |
| `strokeWidth` | `number` | `0.23` | Line weight: in `ink` and `line` the default 0.23 is a 1 px outline at any size (0.3 is the 1.3 px of the larger scenes). |
| `autoPlay` | `boolean` | `true` | The glass looks over the rows when the card scrolls into view. Off shows it at rest and nothing moving. |
| `loop` | `boolean` | `false` | Look again every few seconds. Off plays it once, which suits a state people sit in front of. |
| `replayOnClick` | `boolean` | `true` | Clicking the card sends the glass over the rows again. |
| `title` | `string` | — | Accessible description of the illustration. Without it the drawing is decorative and the copy speaks for it. |
| `artClassName` | `string` | — | Classes for the illustration alone; size it with width (it keeps its aspect ratio). Default `w-56`. |
| `className` | `string` | — | Classes for the wrapper of the whole state (it is a centred column, `max-w-sm` wide). |

## Files

The install adds:

- `components/isometric/magnifying-glass.tsx`
- `components/isometric/iso-core.tsx`

npm dependencies (installed for you): `motion`.

shadcn/ui components it uses (the shadcn CLI adds any that are missing): `button`.