EssenceUI.Components.Link (Essence UI v0.2.0)

Copy Markdown View Source

Themed link with size, weight, and underline options.

Summary

Functions

Renders a link.

Functions

es_link(assigns)

Renders a link.

Phoenix LiveView navigation is supported via navigate / patch (implemented with Phoenix.Component.link/1).

Attributes

  • href (:string) - The link href. Only for <a> elements. Defaults to nil.
  • navigate (:string) - LiveView navigate path (client-side navigation). Defaults to nil.
  • patch (:string) - LiveView patch path (same LiveView). Defaults to nil.
  • target (:string) - Target attribute for <a> elements. Defaults to nil.
  • rel (:string) - Rel attribute for <a> elements. Defaults to nil.
  • underline (:string) - Underline style: auto, always, hover, none. Defaults to "auto". Must be one of "auto", "always", "hover", or "none".
  • color (:string) - Color utility class string. One of: gray, gold, bronze, brown, yellow, amber, orange, tomato, red, ruby, crimson, pink, plum, purple, violet, iris, indigo, blue, cyan, teal, jade, green, grass, lime, mint, sky. Must be one of "gray", "gold", "bronze", "brown", "yellow", "amber", "orange", "tomato", "red", "ruby", "crimson", "pink", "plum", "purple", "violet", "iris", "indigo", "blue", "cyan", "teal", "jade", "green", "grass", "lime", "mint", or "sky".
  • high_contrast (:boolean) - Whether to increase color contrast with the background.
  • as_child (:boolean) - Composes the component into its immediate child instead of rendering its own HTML element. Defaults to false.
  • class (:string) - Additional CSS classes. Defaults to nil.
  • style (:string) - Additional inline styles. Defaults to nil.
  • Global attributes are accepted.

Slots

  • inner_block (required)