@zag-js/password-input
Version:
Core logic for the password-input widget implemented as a state machine
7 lines (4 loc) • 297 B
text/typescript
import type { Scope } from "@zag-js/core"
export const getRootId = (ctx: Scope) => ctx.ids?.root ?? `p-input-${ctx.id}`
export const getInputId = (ctx: Scope) => ctx.ids?.input ?? `p-input-${ctx.id}-input`
export const getInputEl = (ctx: Scope) => ctx.getById<HTMLInputElement>(getInputId(ctx))