ComponentsAnimated Tags

Animated Tags

Component that displays tags with an animation when they are added or removed from the list of selected tags

Selected Tags

react
tailwindcss
javascript
typescript
nextjs

Code

1

Install with shadcn Beta

Terminal

npx shadcn@latest add @smoothui/animated-tags

Or install the demo

Terminal

npx shadcn@latest add @smoothui/animated-tags-demo

How to use

Demo.tsx

"use client"

import React, { useState } from "react"

import AnimatedTags from "@/components/smoothui/ui/AnimatedTags"

const initialTags = [
  "react",
  "tailwindcss",
  "javascript",
  "typescript",
  "nextjs",
]

const AnimatedTagsDemo = () => {
  const [selected, setSelected] = useState<string[]>([])
  return (
    <div>
      <AnimatedTags
        initialTags={initialTags}
        selectedTags={selected}
        onChange={setSelected}
      />
    </div>
  )
}

export default AnimatedTagsDemo

Props

PropTypeDefault
initialTags?
string[]
-
selectedTags?
string[]
-
onChange?
(selected: string[]) => void
-
className?
string
-