UIViews
SecureField
Accept a password or other private text.
A controlled single-line input that masks what the user types. Use it for passwords, PINs, and tokens.
import { SecureField, useState } from "onescript/views"
function PasswordField() {
const [password, setPassword] = useState("")
return (
<SecureField
value={password}
onChange={setPassword}
prompt="Password"
/>
)
}| Prop | Type | Description |
|---|---|---|
value | string | Current text value. |
onChange | (value: string) => void | Runs when the user changes the text. |
prompt | string | Guidance displayed while the value is empty. |
Also accepts Modifiers. It is only available in App and Action view sessions; widgets reject it with an unsupported view type error.
How is this guide?
Last updated on