ZoonkWeb.Components.Anchor (Zoonk v0.1.0-dev)

View Source

Provides the UI for rendering anchors.

Summary

Functions

Renders a styled link (anchor).

Functions

a(assigns)

Renders a styled link (anchor).

Examples

<.a>Send!</.a>
<.a >Send!</.a>

<.a kind={:icon} icon="tabler-name">
  Icon
</.a>

Attributes

  • class (:any) - CSS class to apply to the anchor. Defaults to nil.
  • kind (:atom) - Kind of anchor to render. Defaults to :link. Must be one of :link, :button, or :icon.
  • variant (:atom) - Variant of anchor to render. Defaults to :primary. Must be one of :primary, :outline, :destructive, :secondary, or :active.
  • size (:atom) - Size of the anchor. Defaults to :sm. Must be one of :adaptive, :sm, :md, or :lg.
  • icon (:string) - Icon to display in the anchor. Defaults to nil.
  • icon_align (:atom) - Icon alignment in the anchor. Defaults to :auto. Must be one of :left, :right, or :auto.
  • Global attributes are accepted. HTML attributes to apply to the anchor. Supports all globals plus: ["href", "method", "navigate", "patch"].

Slots

  • inner_block (required)