NK

Search

Search pages, posts, and components

All components

Tag Cloud

Data Display

A cloud of weighted tags that drift in and pop on hover.

FlutterDartNext.jsRustSEO

Installation

Add it with the shadcn CLI:

$pnpm dlx shadcn@latest add https://nawalkattel.com.np/r/tag-cloud.json
Or install manually
  1. 1. Install dependencies

    pnpm add motion clsx tailwind-merge
  2. 2. Copy the component source into components/library/tag-cloud.tsx

Props

PropTypeDefaultDescription
tags{ label: string; weight?: number }[] - Tags with an optional 0-3 weight.

Accessibility

  • Weight maps to a bounded size scale, so text never becomes unreadable.
  • Weight is clamped, so an out-of-range value cannot break layout.
  • Hover feedback is scale and colour together.

Dependencies

motionclsxtailwind-merge