dioxus_nox_tag_input/lib.rs
1//! **⚠️ Disclaimer:** This crate was entirely generated by AI (Claude) as part of a
2//! personal learning project. It has not been battle-tested in production and may
3//! contain bugs or unsound abstractions. Use at your own risk and exercise extreme
4//! caution before depending on it in anything that matters.
5//!
6//! Headless tag input for [Dioxus](https://dioxuslabs.com) 0.7.
7//!
8//! Provides reactive state management and keyboard logic for multi-tag inputs.
9//! You bring your own markup and styling — the library handles selection, filtering,
10//! ARIA attributes, and keyboard interaction.
11//!
12//! # Usage modes
13//!
14//! **Hook API** — maximum control. Call [`use_tag_input`] and wire signals into your RSX:
15//!
16//! ```ignore
17//! let state = use_tag_input(available_tags, initial_selected);
18//! // use state.selected_tags, state.filtered_suggestions, state.handle_keydown, etc.
19//! ```
20//!
21//! **Compound components** — less boilerplate. Radix-style components with built-in ARIA
22//! and `data-*` attributes for CSS targeting:
23//!
24//! ```ignore
25//! use dioxus_nox_tag_input::components as tag_input;
26//!
27//! tag_input::Root::<MyTag> {
28//! available_tags: tags,
29//! tag_input::Control::<MyTag> {
30//! // Tag pills + Input here
31//! }
32//! tag_input::Dropdown::<MyTag> {
33//! // Option items here
34//! }
35//! }
36//! ```
37//!
38//! See the [`components`] module for the full compound API, or [`TagInputState`] for
39//! the hook-level API.
40
41mod breakpoint;
42#[cfg(feature = "combobox")]
43pub mod combo;
44pub mod components;
45mod hook;
46mod tag;
47#[cfg(test)]
48mod tests;
49
50pub use breakpoint::{Breakpoint, use_breakpoint};
51pub use hook::{
52 SuggestionGroup, TagInputConfig, TagInputGroupConfig, TagInputState, extract_clipboard_text,
53 find_match_ranges, is_denied, use_tag_input, use_tag_input_grouped, use_tag_input_with,
54};
55pub use tag::{Tag, TagLike};