Reka UI logoReka
backdrop
Utilities

useId

Deprecated

Vue 3.5 released an official client-server stable solution for useId.

Generate random id

Usage

ts
import { useId } from 'reka-ui'

const buttonId = useId() // radix-1
ts
import { useId } from 'reka-ui'

const buttonId = useId('test-id') // test-id