Skip to content

useId

Deprecated

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

Generate random id

Usage

ts
import { useId } from 'radix-vue'

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

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