---
title: "Density Lens | Free React & Tailwind Craft Component | Motion UI"
canonical: "https://blacknest.dev/motion/c/craft/density-lens"
github_source: "https://github.com/Rkj0123/motion-ui-skill/blob/main/components/craft/density-lens.tsx"
install_command: "npx motion-ui-skill add density-lens"
dependencies: ["clsx","motion","react","tailwind-merge"]
category: "craft"
subcategory: "craft"
---

# Density Lens

> An interactive floating lens that tracks pointer movement to reveal high-density data, magnified details, or alternative views.

## Install

```bash
npx motion-ui-skill add density-lens
```

## Dependencies

- `clsx`
- `motion`
- `react`
- `tailwind-merge`

## Usage

```tsx
"use client";

import { DensityLens as DensityLens } from "@/components/craft/density-lens";

export function Example() {
  return (
    <div className="p-6">
      <DensityLens />
    </div>
  );
}
```

## Source Files

- [components/craft/density-lens.tsx](https://github.com/Rkj0123/motion-ui-skill/blob/main/components/craft/density-lens.tsx)
- [lib/utils.ts](https://github.com/Rkj0123/motion-ui-skill/blob/main/lib/utils.ts)
