A

Renders an anchor component.

Read more Read less

This is a wrapper around Phoenix.Component.link/1 and is used the same way.

Links can be styled as buttons:

<.a href="#" size="lg" as="button">link</a>

When given the as attribute, many of the attributes from the button components are available. See DesignSystem.Components.Button.

Attribute Type Documentation Default Value
patch :string
navigate :string
href :string
as :string
primary :boolean

Renders link styled as a primary button.

Read more Read less
false

Can only be used with as: "button"

secondary :boolean

Renders link styled as a secondary button.

Read more Read less
false

Can only be used with as: "button"

ghost :boolean

Renders link styled as a ghost button.

Read more Read less
false

Can only be used with as: "button"

danger :boolean

Renders link styled as a danger button.

Read more Read less
false

Can only be used with as: "button"

compact :boolean

Renders link styled as a compact button.

Read more Read less
false

Can only be used with as: "button"

size :string

Size of the link (xs, sm, base, lg)

"base"
icon :string
icon_weight :string "extrabold"
rest :global
inner_block :slot
<.row space="xs" justify="start" align="center">
  <.icon name="arrow-left" size="sm" /> Go Back
</.row>