52 Pro components and page blocks

Get Pro

Tag Input

New

Preview

Customize

Max8
Duration0.35s

Usage

import { TagInput } from "@/components/uibrik/tag-input/tag-input";

<TagInput />

Installation

npx shadcn@latest add https://uibrik.com/r/tag-input.json
Adds the files to components/uibrik/tag-input and installs motion. With the @uibrik namespace set up: npx shadcn@latest add @uibrik/tag-input.

Props

TagInput
placeholder
Type string
"Add a tag"
Shown while there are no tags.
max
Type number
8
Most tags allowed.
duration
Type number
0.35
How long chips and the field take to move.
ignoreCase
Type boolean
true
Treat Design and design as the same tag.
disabled
Type boolean
false
Grey the field out and ignore input.
value / onChange
Type string[] / (tags) => void
–
Controlled tags.
defaultValue
Type string[]
–
Tags on mount when uncontrolled.
delimiters
Type string[]
[","]
Keys besides Enter that finish a tag. Pasted text splits on these and on new lines.
transform
Type (text) => string | null
–
Turns typed text into a tag, or rejects it with null. Defaults to trimming.
label
Type string
"Tags"
Names the field for screen readers.
className
Type string
–
Classes for the box.