SearchCtrlK

  • ↑↓navigate
  • ↵open
  • escclose

Can’t find it? Contact us

confirmPhrase

Why JS.

tsx
import { confirmPhrase } from "@sdxc/ui/mixins";

Usage

Applied to a type-to-confirm field: enables the enclosing dialog's [data-confirm-action] control exactly while the field holds phrase, and clears the field when the dialog closes so every opening starts locked.

Signature

typescript
confirmPhrase(phrase: string): MixinDescriptor<HTMLInputElement>

Parameters

ParameterTypeRequiredDescription
phrasestringYes

Examples

tsx
<Input pattern={escaped} required mix={[confirmPhrase("acme-ops")]} />

The events, constants and types its module publishes, each imported from @sdxc/ui/mixins too.

Constant

CONFIRM_ACTION_ATTRIBUTE

Attribute marking a dialog's confirming control, which confirmPhrase enables on a match.

typescript
const CONFIRM_ACTION_ATTRIBUTE = "data-confirm-action"
@sdxc/ui

Can’t find it? Contact us