Phoenix.Component's global attributes

Notes

With Phoenix’s function components, I often want to pass down HTML attributes like class, data attributes (e.g. data-role), etc.

I thought we’d need to declare every attr, but Phoenix has a lovely :global attribute type that allows us to pass all standard HTML attributes with one declaration. ✨

Want the latest Elixir Streams in your inbox?

    No spam. Unsubscribe any time.