kliping.pro
  • Docs
  • Explore
  • Builder
  • Directory
  • Colors
  • Typeset
Saved
Docs
  • Sections13
  • Installation5
  • Dark Mode4
  • Forms3
  • Registry6
  • Utilities2
  • More10
  • Components137
  • Accordion
  • Action Bar
  • AI Chat
  • AI Thread List
  • Alert
  • Alert Dialog
  • Angle Slider
  • Animated Grid Pattern
  • Aspect Ratio
  • Attachment
  • Avatar
  • Avatar Group
  • Badge
  • Badge Overflow
  • Banner
  • Border Beam
  • Breadcrumb
  • Bubble
  • Button
  • Button Group
  • Calendar
  • Card
  • Carousel
  • Chart
  • Checkbox
  • Checkbox Group
  • Chip
  • Circular Progress
  • Client Only
  • Collapsible
  • Color Picker
  • Color Swatch
  • Combobox
  • Combobox Advanced
  • Command
  • Compare Slider
  • Composition
  • Context Menu
  • Cropper
  • Data Grid
  • Data Table
  • Data Table Advanced
  • Date Picker
  • Dialog
  • Direction Provider
  • Dot Pattern
  • Drawer
  • Dropdown Menu
  • Editable
  • Empty
  • Field
  • File Upload
  • Form
  • FPS
  • Gauge
  • Hitbox
  • Hover Card
  • Input
  • Input Group
  • Input OTP
  • Item
  • Kanban
  • Kbd
  • Kbd Advanced
  • Key Value
  • Label
  • List
  • Listbox
  • Logos
  • Map
  • Marker
  • Marquee
  • Mask Input
  • Masonry
  • Media Player
  • Mention
  • Menubar
  • Message
  • Message Scroller
  • Native Select
  • Navigation Menu
  • Number Field
  • Pagination
  • Particles
  • Pending
  • Phone Input
  • Pin Input
  • Popover
  • Portal
  • Presence
  • Progress
  • QR Code
  • Questionnaire
  • Radio Group
  • Range Calendar
  • Rating
  • Relative Time Card
  • Resizable
  • Responsive Dialog
  • Scroll Area
  • Scroll Spy
  • Scroller
  • Segmented Input
  • Select
  • Selection Toolbar
  • Separator
  • Sheet
  • Sidebar
  • Skeleton
  • Slider
  • Software Purchase Card
  • Sonner
  • Sortable
  • Speed Dial
  • Spinner
  • Stack
  • Stat
  • Status
  • Stepper
  • Stepper Advanced
  • Swap
  • Switch
  • Table
  • Tabs
  • Tags Input
  • Tags Input Advanced
  • Textarea
  • Time Picker
  • Timeline
  • Toast
  • Toggle
  • Toggle Group
  • Tooltip
  • Tour
  • Typography
  • Visually Hidden
  • Visually Hidden Input
  1. Docs
  2. Components
  3. Tags Input

Tags Input

PreviousNext

Isian yang menampilkan tag di dalamnya, diikuti isian teks sungguhan.

Docs API Reference
Apple
Banana

Installation ​

pnpm dlx kliping@latest add tags-input

Pasang dependensi berikut:

pnpm add reka-ui

Salin dan tempel kode sumber di GitHub ke project Anda.

Sesuaikan path import dengan struktur project Anda.

Examples ​

Tags dengan Listbox ​

Nuxt
Remix

Requirements ​

Semua dipasang otomatis oleh kliping add; tabel ini untuk Anda yang memasang manual atau memeriksa project.

RequirementValue
ProjectVue 3.5+, Tailwind CSS v4, alias @ — disiapkan kliping init
npm packages@lucide/vue@^1.31.0, @vueuse/core@^14.4.0, reka-ui@^2.10.3
Filescomponents/ui/tags-input/tags-input.vue
components/ui/tags-input/tags-input-input.vue
components/ui/tags-input/tags-input-item.vue
components/ui/tags-input/tags-input-item-delete.vue
components/ui/tags-input/tags-input-item-text.vue
components/ui/tags-input/index.ts

Anatomy ​

Susunan bagiannya seperti dipakai di contoh-contoh di atas. Impor semua bagian dari satu tempat, lalu susun begini:

vue
<TagsInput>
  <TagsInputItem>
    <TagsInputItemText />
    <TagsInputItemDelete />
  </TagsInputItem>
  <TagsInputInput />
</TagsInput>

API Reference ​

TagsInput ​

PropTypeDefaultDescription
modelValue?AcceptableInputValue[]—The controlled value of the tags input. Can be bind as v-model.
defaultValue?AcceptableInputValue[]—The value of the tags that should be added. Use when you do not need to control the state of the tags input
addOnPaste?boolean—When true, allow adding tags on paste. Work in conjunction with delimiter prop.
addOnTab?boolean—When true allow adding tags on tab keydown
addOnBlur?boolean—When true allow adding tags blur input
duplicate?boolean—When true, allow duplicated tags.
disabled?boolean—When true, prevents the user from interacting with the tags input.
delimiter?string | RegExp—The character or regular expression to trigger the addition of a new tag. Also used to split tags for @paste event
dir?Direction—The reading direction of the combobox when applicable.
If omitted, inherits globally from ConfigProvider or assumes LTR (left-to-right) reading mode.
max?number—Maximum number of tags.
id?string—The id of the rendered element.
convertValue?((value: string) => AcceptableInputValue)—Convert the input value to the desired type. Mandatory when using objects as values and using TagsInputInput
displayValue?((value: AcceptableInputValue) => string)—Display the value of the tag. Useful when you want to apply modifications to the value like adding a suffix or when using object as values
asChild?boolean—Change the default rendered element for the one passed as a child, merging their props and behavior. Read our Composition guide for more details.
as?AsTag | Component—The element or component this component should render as. Can be overwritten by asChild.
name?string—The name of the field. Submitted with its owning form as part of a name/value pair.
required?boolean—When true, indicates that the user must set the value before the owning form can be submitted.
EventPayloadDescription
@update:modelValue[payload: AcceptableInputValue[]]Emitted when the value changes.
@invalid[payload: AcceptableInputValue]Emitted when a new value is rejected (duplicate or over max).
@addTag[payload: AcceptableInputValue]Emitted when a tag is added, with its value.
@removeTag[payload: AcceptableInputValue]Emitted when a tag is removed, with its value.
SlotProps
#default{ modelValue: AcceptableInputValue[]; }

TagsInputInput ​

PropTypeDefaultDescription
placeholder?string—The placeholder character to use for empty tags input.
autoFocus?boolean—Focus on element when mounted.
maxLength?number—Maximum number of character allowed.
asChild?boolean—Change the default rendered element for the one passed as a child, merging their props and behavior. Read our Composition guide for more details.
as?AsTag | Component—The element or component this component should render as. Can be overwritten by asChild.

TagsInputItem ​

PropTypeDefaultDescription
valueAcceptableInputValue—Value associated with the tags
disabled?boolean—When true, prevents the user from interacting with the tags input.
asChild?boolean—Change the default rendered element for the one passed as a child, merging their props and behavior. Read our Composition guide for more details.
as?AsTag | Component—The element or component this component should render as. Can be overwritten by asChild.
SlotProps
#default—

TagsInputItemDelete ​

PropTypeDefaultDescription
asChild?boolean—Change the default rendered element for the one passed as a child, merging their props and behavior. Read our Composition guide for more details.
as?AsTag | Component—The element or component this component should render as. Can be overwritten by asChild.
SlotProps
#default—

TagsInputItemText ​

PropTypeDefaultDescription
asChild?boolean—Change the default rendered element for the one passed as a child, merging their props and behavior. Read our Composition guide for more details.
as?AsTag | Component—The element or component this component should render as. Can be overwritten by asChild.
SlotProps
#default—

Keyboard Interactions ​

Perilaku keyboard-nya datang dari primitif Reka UI TagsInput yang dipakai komponen ini, mengikuti pola WAI-ARIA.

KeyDescription
DeleteWhen tag is active, remove it and set the tag on right active.
BackspaceWhen tag is active, remove it and set the tag on left active. If there are no tags to the left, either the next tags gets focus, or the input.
ArrowRightSet the next tag active.
ArrowLeftSet the previous tag active.
HomeSet the first tag active
EndSet the last tag active

CSS Variables ​

Token tema yang dibaca komponen ini — ubah nilainya di CSS global (:root dan .dark, lihat Theming) untuk mengubah tampilannya tanpa menyentuh komponennya: --background, --border, --destructive, --input, --radius, --ring, --secondary.

Credits ​

Berasal dari shadcn-vue (MIT, Copyright (c) 2023 unovue). Rantai lengkapnya di Credits.

PreviousTabsNext Tags Input Advanced

On This Page

InstallationExamplesTags dengan ListboxRequirementsAnatomyAPI ReferenceTagsInputTagsInputInputTagsInputItemTagsInputItemDeleteTagsInputItemTextKeyboard InteractionsCSS VariablesCredits

© 2026 Kliping. Free components are open source under the MIT License.

LicenseCreditsRoadmap