PtahUi.Components.FlexLink (PtahUI v0.1.0)

Copy Markdown View Source

A flexible link component that renders as <a>, <.link patch>, <.link navigate>, or <button>.

Usage

alias PtahUi.Components.FlexLink, as: Link

<Link.a link_type="live_patch" to={~p"/users"}>Users</Link.a>
<Link.a link_type="button" phx-click="do_something">Click</Link.a>

Summary

Functions

a(assigns)

Attributes

  • class (:any) - Defaults to nil.
  • link_type (:string) - Defaults to "a".
  • label (:string) - Defaults to nil.
  • to (:string) - Defaults to nil.
  • method (:string) - Defaults to nil.
  • disabled (:boolean) - Defaults to false.
  • Global attributes are accepted. Supports all globals plus: ["download", "hreflang", "referrerpolicy", "rel", "target", "type"].

Slots

  • inner_block