useUniqueSafeId

See source code

React's useId hook returns a unique id for the component. However, it uses a colon in the id, which is not valid for CSS selectors. This hook replaces the colon with an underscore.

function useUniqueSafeId(suffix?: string): SafeId

Parameters

NameDescription

suffix

string

Returns

Prev
useTransform
Next
assertIdType