Homecomponentsnavigational

ButtonLink

A link for navigating that looks like a button.


Use ButtonLink to create a link that looks like a button.

By default, ButtonLink routes using NextJS. To disable this and use regular links, see Disabling Next Routing.

Ghost Buttons

Use ghost to remove the background and borders from the buttons.

Bleeding For Alignment

Ghost buttons have an invisible spacing around them that would not align flush with other elements. In such cases you can use bleedH to remove the spacing horizontally and bleedV to remove the spacing on the top and bottom. You can use bleed as a shorthand for both directions.

This has no impact on non-ghost variants.

Sizes

Use size to set the size of the button link.

Full Width

Use fullWidth to make the button fill the width of its container.

Icons

Use startIcon or endIcon to add an icon to either side of the button.

After label

Dark Background

Use onColor as variant when button is placed over a colored background. The property ghost has no effect when onColor is used.

Disabling Next Routing

Use the noNext property to disable the NextJS routing. This can be useful for links to pages that are routed outside of NextJS.

API

href
Required
The href of the link.
string

children
Required
The text of the link.
ReactNode

id
The ID of the link.
string

startIcon
Icon to show before the label.
IconComponent

endIcon
Icon to show after the label.
IconComponent

size
The size of the link.
small
medium
large

bleedH
Bleed the button horizontally. Works only when ghost.
true
false

bleedV
Bleed the button vertically. Works only when ghost.
true
false

bleed
Shorthand for bleedH and bleedV.
true
false

fullWidth
Make the button fill the width of its container.
ResponsiveValue<boolean>

target
The target of the link.
HTMLAttributeAnchorTarget

onClick
The handler to call when the link is clicked.
MouseEventHandler<HTMLAnchorElement>

noNext
Disabled wrapping in NextLink.
true
false

variant
primary
secondary
caution
onColor
apple
facebook
google
instagram
linkedin
paypal
stripe
twitter

ghost
true
false

data
An object with the data keys and values.
DataAttributeMap