Input
UI SDK Input, InputGroup and InputClear (clears and returns focus).
Example
https://Clear website
input-demo.tsxCopy code
Installation
Copy code
Usage
ImportCopy code
API reference
Input
| Prop | Type | Default |
|---|---|---|
sensitiveA secret, like an API key: an uncontrolled password field (UI SDK's PasswordInput, which agents always read as redacted) whose value never reaches a DOM attribute. It takes no `value` or `defaultValue`. Read it through `sensitiveController` or the `ref`, or bind it with `FormField`, which reads it on submit and clears it after. `autoComplete` is `new-password` by default, so browsers never fill a saved sign-in password into it. | boolean | false |
revealableWith `sensitive`: a toggle that shows and hides the value; it hides again on submit and when the page is hidden. | boolean | – |
revealLabelNames the toggle; "Show" by default. | string | – |
sensitiveControllerWith `sensitive`: reads, clears and focuses the field from anywhere; `createPasswordInputController()`. | PasswordInputController | – |
Also takes every prop of UI SDK Input.
InputGroup
Other exports
fieldSurfaceClassNamenamingAndMarkingAttributesOftype InputPropsAccessibility
- InputClear clears the value and returns focus to the input.
- Named by the surrounding Field's label.
- A sensitive input is a native password field; its Show toggle keeps one name and says whether the value shows with aria-pressed.
Agent actions
Agents set its value with setValue; a containing Field validates on the agent's blur. A sensitive input reads as [redacted] to agents, shown or hidden, though they can still fill it.
Runs agent.snapshot() from @ui-sdk/react/agent on the live preview above.