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.
- After blur or submit, call setVisible(false) to hide again.
- When disabled / readOnly, the programmatic API is also a no-op.
For the hook API see useViraPassword(), for styling and icons see customization.
