Programmatic
Control visibility from code with isVisible, toggle, and setVisible.
← All examples·programmatic
Preview
Status: hidden
Details
- The hook return includes isVisible, toggle(), and setVisible(visible).
- Set initial state with defaultVisible.
- hideOnBlur hides the password again when focus leaves the field; submitting the form hides it by default.
- When disabled / readOnly, the programmatic API is also a no-op.
For the hook API see useViraPassword(), for styling and icons see customization.