On Visibility Change (Server)
| Time | Source | Value |
|---|---|---|
|
No event yet. Interact with the components to receive new events |
On Visibility Change (Client)
| Time | Source | Value |
|---|---|---|
|
No event yet. Interact with the components to receive new events |
To enable Corex Accessibility, see the documentation .
| Time | Source | Value |
|---|---|---|
|
No event yet. Interact with the components to receive new events |
<.password_input
class="password-input"
name="user[password]"
on_visibility_change="password_visibility_changed"
>
<:label>Password</:label>
<:visible_indicator><.heroicon name="hero-eye" class="icon" /></:visible_indicator>
<:hidden_indicator><.heroicon name="hero-eye-slash" class="icon" /></:hidden_indicator>
</.password_input>
def handle_event("password_visibility_changed", %{"id" => id, "visible" => visible} = params, socket) do
IO.inspect(params, label: "password_visibility_changed")
{:noreply, socket}
end
| Time | Source | Value |
|---|---|---|
|
No event yet. Interact with the components to receive new events |
<.password_input
class="password-input"
name="user[password]"
on_visibility_change_client="password-visibility-changed"
>
<:label>Password</:label>
<:visible_indicator><.heroicon name="hero-eye" class="icon" /></:visible_indicator>
<:hidden_indicator><.heroicon name="hero-eye-slash" class="icon" /></:hidden_indicator>
</.password_input>
const el = document.getElementById(\"password-input-events-client\");
el?.addEventListener(\"password-visibility-changed\", (event) => console.log(event.detail));
const el = document.getElementById(\"password-input-events-client\");
el?.addEventListener(\"password-visibility-changed\", (event: Event) =>
console.log((event as CustomEvent<unknown>).detail)
);