BlockDex

Components

Registries

Free blocks

Method

BlockDex

Components

Registries

Free blocks

Method

Open API

BlockDex

Components

Registries

Free blocks

Method

Open API

Components/formcn/tag-input

Tag Input

formcn/tag-input
FreeComponent

Tag input component

Install it

npx shadcn@latest add https://formcn.dev/r/tag-input.json

Source

src/components/tag-input.tsxformcn.dev/r/tag-input.json
1import {
2 TagInput as EmblorTagInput,
3 type Tag,
4 type TagInputProps,
5} from 'emblor'
6import { type Dispatch, type SetStateAction, useState } from 'react'
7
8type TagInputWrapperProps = {
9 tags?: Tag[]
10 setTags: Dispatch<SetStateAction<Tag[]>>
11} & Omit<
12 TagInputProps,
13 'activeTagIndex' | 'setActiveTagIndex' | 'tags' | 'setTags'
14>
15
16export function TagInput({
17 tags,
18 setTags,
19 name,
20 ...rest
21}: TagInputWrapperProps) {
22 const [activeTagIndex, setActiveTagIndex] = useState<number | null>(null)
23
24 return (
25 <EmblorTagInput
26 id={name}
27 styleClasses={{
28 inlineTagsContainer:
29 'border-input rounded-md dark:bg-input/30 shadow-xs transition-[color,box-shadow] focus-within:border-ring outline-none focus-within:ring-[3px] focus-within:ring-ring/50 p-1 gap-1.5',
30 input: 'w-full min-w-[80px] shadow-none px-2 h-7',
31 tag: {
32 body: 'h-7 relative bg-input/60 border border-input hover:bg-secondary rounded-md font-medium text-xs ps-2 pe-7',
33 closeButton:
34 'absolute -inset-y-px -end-px p-0 rounded-e-md flex size-7 transition-[color,box-shadow] outline-none focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px] text-muted-foreground/80 hover:text-foreground',
35 },
36 }}
37 tags={tags ?? []}
38 setTags={setTags}
39 {...rest}
40 activeTagIndex={activeTagIndex}
41 setActiveTagIndex={setActiveTagIndex}
42 animation="fadeIn"
43 truncate={15}
44 />
45 )
46}

What it pulls in

npm packages

  • emblor

Files it writes

  • src/components/tag-input.tsx

Facts

Registry
formcn
Type
registry:component
Access
Free
Files written
1
Licence
the repository states none
First indexed
2026-08-03
Last confirmed
yesterday

Go to the source

formcn.dev alibey-10/formcn on GitHub Raw registry item This item as JSON

More from formcn

All 9 items
Same registry, same kind — the ones you would have found next
ComponentRegistryKindAccessInstallsCommand
File Inputfile-uploadformcnComponentsFreeno deps
Multi-selectmulti-selectformcnComponentsFreeno deps
Multi-step formmulti-step-viewerformcnComponentsFree1 dep
PasswordpasswordformcnComponentsFreeno deps
RatingratingformcnComponentsFreeno deps
StepperstepperformcnComponentsFreeno deps
BlockDex

Built by

Kynth Studio

Index

Components
Registries
Method
Open API

Guides

shadcn component libraries
Best shadcn registries
Free shadcn blocks

Reference

Corpus counts
Crawl health
hello@kynth.studio
Privacy
Terms

BlockDex

BlockDex

Built by

Kynth Studio

Index

Components
Registries
Method
Open API

Guides

shadcn component libraries
Best shadcn registries
Free shadcn blocks

Reference

Corpus counts
Crawl health
hello@kynth.studio
Privacy
Terms

BlockDex

BlockDex

Built by

Kynth Studio

Index

Components
Registries
Method
Open API

Guides

shadcn component libraries
Best shadcn registries
Free shadcn blocks

Reference

Corpus counts
Crawl health
hello@kynth.studio
Privacy
Terms

BlockDex