Back to Tuist

LinkButton

noora/docs/components/linkbutton.md

4.204.02.4 KB
Original Source
<!-- Generated by scripts/generate-web-components.js. Do not edit directly. -->

LinkButton

Presents a text-oriented button or link.

html
<noora-link-button href="/docs" label="Documentation"></noora-link-button>

Attributes

AttributeType or allowed valuesDefaultDescription
labelstring""Sets the visible label.
variantprimary, secondary, destructive"primary"Controls semantic emphasis.
sizesmall, medium, large"large"Controls dimensions.
hrefstringNoneRenders a native link to this location.
underlinebooleanfalseUnderlines the label.
disabledbooleanfalseDisables activation.

Slots

SlotDescription
icon-leftAn icon before the label.
icon-rightAn icon after the label.

Styling parts

PartDescription
controlThe native link or button.

Variant

Match the LiveView primary, secondary, and destructive variations.

html
<noora-link-button href="#" label="Primary" variant="primary"></noora-link-button>
<noora-link-button href="#" label="Secondary" variant="secondary"></noora-link-button>
<noora-link-button href="#" label="Destructive" variant="destructive"></noora-link-button>

Size

Match the LiveView large, medium, and small variations.

html
<noora-link-button href="#" label="Large" size="large"></noora-link-button>
<noora-link-button href="#" label="Medium" size="medium"></noora-link-button>
<noora-link-button href="#" label="Small" size="small"></noora-link-button>

Disabled

Disable the primary link button.

html
<noora-link-button label="Disabled" variant="primary" disabled></noora-link-button>

Underline

Render an underlined link button.

html
<noora-link-button href="#" label="Underline" underline></noora-link-button>

Icon

Match the LiveView left, right, and two-sided icon variations.

html
<noora-link-button href="#" label="Icon"><noora-icon slot="icon-left" name="chevron_left"></noora-icon></noora-link-button>
<noora-link-button href="#" label="Icon"><noora-icon slot="icon-right" name="chevron_right"></noora-icon></noora-link-button>
<noora-link-button href="#" label="Icon"><noora-icon slot="icon-left" name="chevron_left"></noora-icon><noora-icon slot="icon-right" name="chevron_right"></noora-icon></noora-link-button>