Phoenix LiveView
▼
Project version
v1.0.5
v1.0.4
v1.0.3
v1.0.2
v1.0.1
v1.0.0
v1.0.0-rc.9
v1.0.0-rc.8
v1.0.0-rc.7
v1.0.0-rc.6
v1.0.0-rc.5
v1.0.0-rc.4
v1.0.0-rc.3
v1.0.0-rc.2
v1.0.0-rc.1
v1.0.0-rc.0
v0.20.17
v0.20.16
v0.20.15
v0.20.14
v0.20.13
v0.20.12
v0.20.11
v0.20.10
v0.20.9
v0.20.8
v0.20.7
v0.20.6
v0.20.5
v0.20.4
v0.20.3
v0.20.2
v0.20.1
v0.20.0
v0.19.5
v0.19.4
v0.19.3
v0.19.2
v0.19.1
v0.19.0
v0.18.18
v0.18.17
v0.18.16
v0.18.15
v0.18.14
v0.18.13
v0.18.12
v0.18.11
v0.18.10
v0.18.9
v0.18.8
v0.18.7
v0.18.6
v0.18.5
v0.18.4
v0.18.3
v0.18.2
v0.18.1
v0.18.0
v0.17.14
v0.17.13
v0.17.12
v0.17.11
v0.17.10
v0.17.9
v0.17.8
v0.17.7
v0.17.6
v0.17.5
v0.17.4
v0.17.3
v0.17.2
v0.17.1
v0.17.0
v0.16.4
v0.16.3
v0.16.2
v0.16.1
v0.16.0
v0.15.7
v0.15.6
v0.15.5
v0.15.4
v0.15.3
v0.15.2
v0.15.1
v0.15.0
v0.14.8
v0.14.7
v0.14.6
v0.14.5
v0.14.4
v0.14.3
v0.14.2
v0.14.1
v0.14.0
v0.13.3
v0.13.2
v0.13.1
v0.13.0
v0.12.1
v0.12.0
v0.11.1
v0.11.0
v0.10.0
v0.9.0
v0.8.1
v0.8.0
v0.7.1
v0.7.0
v0.6.0
v0.6.0-dev
v0.5.2
v0.5.1
v0.5.0
v0.4.1
v0.4.0
v0.3.1
v0.3.0
v0.2.1
v0.2.0
v0.1.1
v0.1.0
GUIDES
Modules
API Reference
Modules
Changelog
Backwards incompatible changes for 1.0
1.0.4 (2025-02-04)
1.0.3 (2025-01-28)
1.0.2 (2025-01-09)
1.0.1 (2024-12-13)
1.0.0 (2024-12-03) 🚀
1.0.0-rc.9 (2024-12-03)
1.0.0-rc.8 (2024-12-02)
1.0.0-rc.7 (2024-10-17)
1.0.0-rc.6 (2024-06-27)
1.0.0-rc.5 (2024-06-21)
1.0.0-rc.4 (2024-06-20)
1.0.0-rc.3 (2024-06-20)
1.0.0-rc.2 (2024-06-19)
1.0.0-rc.1 (2024-06-18)
1.0.0-rc.0 🚀 (2024-05-08)
0.20.16 (2024-06-20)
0.20.15 (2024-06-18)
0.20.14 (2024-03-13)
0.20.13 (2024-03-12)
0.20.12 (2024-03-04)
0.20.11 (2024-02-29)
0.20.10 (2024-02-28)
0.20.9 (2024-02-19)
0.20.8 (2024-02-19)
0.20.7 (2024-02-15)
0.20.6 (2024-02-14)
0.20.5 (2024-02-08)
0.20.4 (2024-02-01)
0.20.3 (2024-01-02)
0.20.2 (2023-12-18)
0.20.1 (2023-10-09)
0.20.0 (2023-09-22)
0.19.5 (2023-07-19)
0.19.4 (2023-07-10)
0.19.3 (2023-06-21)
0.19.2 (2023-06-12)
0.19.1 (2023-06-06)
0.19.0 (2023-05-29)
0.18.18 (2023-03-16)
0.18.17 (2023-03-09)
0.18.16 (2023-02-23)
0.18.15 (2023-02-16)
0.18.14 (2023-02-14)
0.18.13 (2023-02-10)
0.18.12 (2023-02-10)
0.18.11 (2023-01-19)
0.18.10 (2023-01-18)
0.18.9 (2023-01-17)
0.18.8 (2023-01-16)
0.18.7 (2023-01-13)
0.18.6 (2023-01-09)
0.18.5 (2023-01-09)
0.18.4 (2023-01-05)
0.18.3 (2022-10-26)
0.18.2 (2022-10-04)
0.18.1 (2022-09-28)
0.18.0 (2022-09-20)
0.17.12 (2022-09-20)
0.17.11 (2022-07-11)
0.17.10 (2022-05-25)
0.17.9 (2022-04-07)
0.17.8 (2022-04-06)
0.17.7 (2022-02-07)
0.17.6 (2022-01-18)
0.17.5 (2021-11-02)
0.17.4 (2021-11-01)
0.17.3 (2021-10-28)
0.17.2 (2021-10-22)
0.17.1 (2021-10-21)
0.17.0 (2021-10-21)
0.16.4 (2021-09-22)
0.16.3 (2021-09-03)
0.16.2 (2021-09-03)
0.16.1 (2021-08-26)
0.16.0 (2021-08-10)
0.15.7 (2021-05-24)
0.15.6 (2021-05-24)
0.15.5 (2021-04-20)
0.15.4 (2021-01-26)
0.15.3 (2021-01-02)
0.15.2 (2021-01-01)
0.15.1 (2020-12-20)
0.15.0 (2020-11-20)
0.14.8 (2020-10-30)
0.14.7 (2020-09-25)
0.14.6 (2020-09-21)
0.14.5 (2020-09-20)
0.14.4 (2020-07-30)
0.14.3 (2020-07-24)
0.14.2 (2020-07-21)
0.14.1 (2020-07-09)
0.14.0 (2020-07-07)
0.13.3 (2020-06-04)
0.13.2 (2020-05-27)
0.13.1 (2020-05-26)
0.13.0 (2020-05-21)
0.12.1 (2020-04-19)
0.12.0 (2020-04-16)
0.11.1 (2020-04-08)
0.11.0 (2020-04-06)
0.10.0 (2020-03-18)
0.9.0 (2020-03-08)
0.8.1 (2020-02-27)
0.8.0 (2020-02-22)
0.7.1 (2020-02-13)
0.7.0 (2020-02-12)
0.6.0 (2020-01-22)
0.5.2 (2020-01-17)
0.5.1 (2020-01-15)
0.5.0 (2020-01-15)
0.4.1 (2019-11-07)
0.4.0 (2019-11-07)
0.3.1 (2019-09-23)
0.3.0 (2019-09-19)
0.2.1 (2019-09-17)
0.2.0 (2019-09-12)
0.1.2 (2019-08-28)
0.1.1 (2019-08-27)
0.1.0 (2019-08-25)
Introduction
Welcome
What is a LiveView?
Example
Parameters and session
Bindings
Navigation
Generators
Compartmentalize state, markup, and events in LiveView
Guides
Server-side features
Assigns and HEEx templates
Change tracking
Pitfalls
Deployments and recovery
Error and exception handling
Expected scenarios
Unexpected scenarios
Gettext for internationalization
Locale from parameters
Locale from session
Locale from database
Live layouts
Root layout
Application layout
Updating document title
Live navigation
handle_params/3
Replace page address
Multiple LiveViews in the same page
Security considerations
Authentication vs authorization
live_session
Mounting considerations
Events considerations
Disconnecting all instances of a live user
Summing up
Telemetry
Uploads
Built-in Features
Allow uploads
Render reactive elements
Consume uploaded entries
Appendix A: UploadLive
Client-side integration
Bindings
Click Events
Focus and Blur Events
Key Events
Rate limiting events with Debounce and Throttle
JS commands
DOM patching
Lifecycle events
LiveView events prefix
Scroll events and infinite pagination
External uploads
Chunked HTTP Uploads
Direct to S3
Form bindings
Form events
Error feedback
Number inputs
Password inputs
Nested inputs
File inputs
Submitting the form action over HTTP
Recovery following crashes or disconnects
Resetting forms
JavaScript client specifics
Triggering phx- form events with JavaScript
JavaScript interoperability
Debugging client events
Simulating Latency
Handling server-pushed events
Client hooks via phx-hook
Syncing changes and optimistic UIs
The problem in a nutshell
Optimistic UIs via loading classes
Optimistic UIs via JS commands
Optimistic UIs via JS hooks
Live navigation
Cheatsheets
phx- HTML attributes
Event Handlers
Form Event Handlers
Socket Connection Lifecycle
DOM Element Lifecycle
Client Hooks
Tracking Static Assets
Phoenix.Component
Sections
Attributes
Global attributes
Slots
Embedding external template files
Debug Annotations
Dynamic Component Rendering
Summary
Components
async_result/1
dynamic_tag/1
focus_wrap/1
form/1
inputs_for/1
intersperse/1
link/1
live_component/1
live_file_input/1
live_img_preview/1
live_title/1
Macros
attr/3
embed_templates/2
sigil_H/2
slot/2
slot/3
Functions
assign/2
assign/3
assign_new/3
assigns_to_attributes/2
changed?/2
live_flash/2
live_render/3
render_slot/2
to_form/2
update/3
upload_errors/1
upload_errors/2
used_input?/1
Phoenix.LiveComponent
Sections
Life-cycle
Managing state
Slots
Live patches and live redirects
Cost of live components
Limitations
Summary
Callbacks
handle_async/3
handle_event/3
mount/1
render/1
update/2
update_many/1
Functions
__using__/1
Phoenix.LiveView
Sections
Life-cycle
Template collocation
Async Operations
Endpoint configuration
Summary
Types
unsigned_params/0
Callbacks
handle_async/3
handle_call/3
handle_cast/2
handle_event/3
handle_info/2
handle_params/3
mount/3
render/1
terminate/2
Functions
__live__/1
__using__/1
allow_upload/3
assign_async/4
attach_hook/4
cancel_async/3
cancel_upload/3
clear_flash/1
clear_flash/2
connected?/1
consume_uploaded_entries/3
consume_uploaded_entry/3
detach_hook/3
disallow_upload/2
get_connect_info/2
get_connect_params/1
on_mount/1
push_event/3
push_navigate/2
push_patch/2
put_flash/3
put_private/3
redirect/2
render_with/2
send_update/3
send_update_after/4
start_async/4
static_changed?/1
stream/4
stream_configure/3
stream_delete/3
stream_delete_by_dom_id/3
stream_insert/4
transport_pid/1
uploaded_entries/2
Phoenix.LiveView.AsyncResult
Sections
Fields
Summary
Functions
failed/2
loading/0
loading/1
loading/2
ok/1
ok/2
Phoenix.LiveView.Controller
Summary
Functions
live_render/3
Phoenix.LiveView.JS
Sections
Client Utility Commands
Enhanced push events
DOM Selectors
Custom JS events with JS.dispatch/1 and window.addEventListener
Summary
Types
internal/0
t/0
Functions
add_class/1
add_class/2
add_class/3
concat/2
dispatch/2
dispatch/3
exec/1
exec/2
exec/3
focus/1
focus/2
focus_first/1
focus_first/2
hide/1
hide/2
navigate/1
navigate/2
navigate/3
patch/1
patch/2
patch/3
pop_focus/1
push/1
push/2
push/3
push_focus/1
push_focus/2
remove_attribute/1
remove_attribute/2
remove_attribute/3
remove_class/1
remove_class/2
remove_class/3
set_attribute/1
set_attribute/2
set_attribute/3
show/1
show/2
toggle/1
toggle/2
toggle_attribute/1
toggle_attribute/2
toggle_attribute/3
toggle_class/1
toggle_class/2
toggle_class/3
transition/1
transition/2
transition/3
Phoenix.LiveView.Router
Summary
Functions
fetch_live_flash/2
live/4
live_session/3
Phoenix.LiveViewTest
Sections
Testing function components
Testing LiveViews and LiveComponents
Summary
Functions
assert_patch/2
assert_patch/3
assert_patched/2
assert_push_event/4
assert_redirect/2
assert_redirect/3
assert_redirected/2
assert_reply/3
element/3
file_input/4
find_live_child/2
follow_redirect/3
follow_trigger_action/2
form/3
has_element?/1
has_element?/3
live/3
live_children/1
live_isolated/3
live_redirect/2
open_browser/2
page_title/1
preflight_upload/1
put_connect_params/2
put_submitter/2
refute_push_event/4
refute_redirected/2
render/1
render_async/2
render_blur/2
render_blur/3
render_change/2
render_change/3
render_click/2
render_click/3
render_component/3
render_focus/2
render_focus/3
render_hook/3
render_keydown/2
render_keydown/3
render_keyup/2
render_keyup/3
render_patch/2
render_submit/2
render_submit/3
render_upload/3
rendered_to_string/1
submit_form/2
with_target/2
Configuration
Phoenix.LiveView.HTMLFormatter
Sections
Setup
Options
Formatting
Skip formatting
Summary
Functions
is_tag_open/1
Phoenix.LiveView.Logger
Sections
Installation
Module configuration
Telemetry
Parameter filtering
Phoenix.LiveView.Socket
Summary
Types
assigns/0
assigns_not_in_socket/0
fingerprints/0
t/0
Testing structures
Phoenix.LiveViewTest.Element
Phoenix.LiveViewTest.Upload
Phoenix.LiveViewTest.View
Upload structures
Phoenix.LiveView.UploadConfig
Summary
Types
t/0
Phoenix.LiveView.UploadEntry
Summary
Types
t/0
Phoenix.LiveView.UploadWriter
Sections
Close reasons
Summary
Callbacks
close/2
init/1
meta/1
write_chunk/2
Plugin API
Phoenix.LiveComponent.CID
Phoenix.LiveView.Component
Summary
Types
t/0
Phoenix.LiveView.Comprehension
Summary
Types
t/0
Phoenix.LiveView.Engine
Sections
Phoenix.LiveView.Rendered
Tracking changes
Nesting and fingerprinting
Comprehensions
Components
Phoenix.LiveView.HTMLEngine
Phoenix.LiveView.Rendered
Summary
Types
t/0
Phoenix.LiveView.TagEngine
Summary
Callbacks
annotate_body/1
annotate_caller/2
classify_type/1
handle_attributes/2
void?/1
Functions
component/3
inner_block/2
Exceptions
Phoenix.LiveView.ReloadError
Search documentation of Phoenix LiveView
Settings
View Source
Phoenix.LiveView.ReloadError
exception
(Phoenix LiveView v1.0.4)
×