useId
Utilities · Guide 44 of 46
Purpose
SSR-stable unique id generator.
Use the live utility pattern
The registry does not declare a namespace import for this utility. Copy the working pattern from the live demo and adapt it; do not invent a component import.
Usage checklist
- Start from the working live pattern and keep the utility scope narrow.
- Check server rendering, hydration, cleanup, and nested ownership where relevant.
- Test the composed behavior rather than the helper in isolation.
Secondary reference
After using the local example, consult the upstream Bits UI reference for exhaustive API details.
Continue
- Previous: mergeProps
- Index: All component guides
- Next: IsUsingKeyboard