TIP: Double tap each tag to quickly and easily edit in place.
Custom Icon
Implement any icon of your choosing for the remove action.
Color
Change the tag color using utility classes or custom CSS variables to match your design system.
Provider Pattern
Use the Provider Pattern to gain access to the inner component APIs.
Direction
Set the text direction (ltr or rtl) using the dir prop.
Anatomy
Here’s an overview of how the TagsInput component is structured in code:
import { TagsInput } from '@skeletonlabs/skeleton-react';
export default function Anatomy() {
return (
<TagsInput>
<TagsInput.Label />
<TagsInput.Control>
<TagsInput.Item>
<TagsInput.ItemPreview>
<TagsInput.ItemText />
<TagsInput.ItemDeleteTrigger />
</TagsInput.ItemPreview>
<TagsInput.ItemInput />
</TagsInput.Item>
<TagsInput.Input />
</TagsInput.Control>
<TagsInput.HiddenInput />
<TagsInput.ClearTrigger />
</TagsInput>
);
}<script lang="ts">
import { TagsInput } from '@skeletonlabs/skeleton-svelte';
</script>
<TagsInput>
<TagsInput.Label />
<TagsInput.Control>
<TagsInput.Item>
<TagsInput.ItemPreview>
<TagsInput.ItemText />
<TagsInput.ItemDeleteTrigger />
</TagsInput.ItemPreview>
<TagsInput.ItemInput />
</TagsInput.Item>
<TagsInput.Input />
</TagsInput.Control>
<TagsInput.HiddenInput />
<TagsInput.ClearTrigger />
</TagsInput>API Reference
Unable to load component information for react/tags-input
Unable to load component information for svelte/tags-input