Button

<vara-button> renders an anchor when href is present and a native button otherwise. Use links for navigation and buttons for actions.

Usage

<vara-button label="Read the guide" href="/docs/" icon_end="arrow-right" />

Preview

Read the guide

Props

PropTypeDefaultDescription
labelstringslot contentVisible action label.
hrefstring""Destination. Its presence selects anchor rendering.
targetstring""Link target, such as _blank.
typestring"button"Native button type.
icon_startstring""Decorative icon before the label.
icon_endstring""Decorative icon after the label.
sizestring"md"One of: sm, md, lg.
variantstring"solid"One of: solid, outline, ghost.
colorstring"neutral"One of: neutral, info, success, warning, error.
radiusstring"md"One of: sm, md, lg, full.
full_widthstring"false"Stretch to the available width.
disabledstring"false"Disable native buttons or render links non-interactively.
classstring""Additional CSS classes.

Root-relative href values are deployment-aware. New-tab links automatically receive rel="noopener noreferrer".

Icons

Decorative icons can sit on either side of the label:

<vara-button label="Sign up" href="/signup" icon_start="user-plus" />
<vara-button label="Next step" icon_end="arrow-right" />

Variants