A highly customizable Flutter widget for entering and displaying tags.
Supports multiple layouts, custom styles, validation, and animated tag input.
- Add and delete tags interactively
- Support for inline and column layouts
- Customizable tag colors, borders, padding, and delete icons
- Input validation and separators support
- Optional animations for tag addition/removal
- Custom tag builders for fully tailored UI
Here is a quick demo of how the tag_field package works:
Import the package and use the TagField
widget like this:
TagField(
initialTags: skillTags,
tagBackgroundColor: Colors.purple.shade100,
tagTextColor: Colors.purple.shade800,
tagBorderColor: Colors.purple.shade300,
deleteIconColor: Colors.purple.shade600,
containerBorderColor: Colors.purple.shade200,
containerBorderRadius: 12,
tagBorderRadius: 8,
hintText: 'Add your skills...',
separators: const [' ', ',', ';'],
onTagsChanged: (tags) => setState(() => skillTags = tags),
)
Add the latest version of tag_field
to your pubspec.yaml
dependencies:
dependencies:
tag_field: ^latest_version