Phoenix_live_view: Provide life-cycle CSS classes

Created on 18 Mar 2019  路  3Comments  路  Source: phoenixframework/phoenix_live_view

Today, we have life-cycle classes only at the LiveView root: phx-disconnected and phx-loading. We should document those accordingly.

I also suggest to provide life-cycles for every event. For example, if a button is clicked, a phx-clicked class will be added until click "response" is received from the server. Similar for phx-change and phx-submit events on a form. This probably requires #569 to be implemented.

Most helpful comment

I'd second this. The various classes during the life cycle of an interaction would allow easier CSS animations. Some inspirations from Vue: https://vuejs.org/v2/guide/transitions.html#List-Move-Transitions

All 3 comments

I'd second this. The various classes during the life cycle of an interaction would allow easier CSS animations. Some inspirations from Vue: https://vuejs.org/v2/guide/transitions.html#List-Move-Transitions

+1

+1

Was this page helpful?
0 / 5 - 0 ratings