View Source Bonfire.UI.Common.LinkPatchLive (bonfire_umbrella v0.3.6-classic-beta.7)

Defines an element that will trigger an internal navigation event (eg. switching tabs) and/or render a link (TODO add route validation from Phoenix 1.7)



  • current_account :any, from_context: :current_account

  • current_user :any, from_context: :current_user

  • socket :any

  • to :string, required: false - The required path or URL to link to

  • replace :boolean, default: false - The flag to replace the current history or push a new state (if linking to a LiveView)

  • class :css_class, default: "" - The CSS class for the generated <a> element

  • label :string - The label for the generated <a> element, if no content (default slot) is provided.

  • event_handler :string, required: false - What LiveHandler and/or event name to send the patch event to

  • event_target :string, default: nil - What element (and it's parent view or stateful component) to send the event to

  • name :string, required: false - What state (eg. tab) to switch to

  • opts :keyword, default: [] - Additional attributes to add onto the generated element



  • default - The content of the generated <a> element. If no content is provided, the value of property label is used instead.

Link to this section Summary

Link to this section Functions

Callback implementation for Surface.Component.render/1.

Link to this macro

sigil_p(route, extra)

View Source (macro)