Link button
Link buttons allow users to navigate to a different page. They render an anchor styled as a button.
Usage
Primary
Use this variant for call-to-action buttons on the page that the user is expected to perform next.
There should be no more than three primary buttons on the page at once. Avoid placing two primary buttons near each other.
Secondary
Use this variant for all buttons that don't qualify for primary, tertiary, or warning variants.
This is a default variant, so you don't have to explicitly specify it via variant prop.
Tertiary
Use this variant for a quieter button. This button does not have a border.
Warning
Use this variant for linking to a page that contains a dangerous or destructive action.
Disabled
Disabled button indicates that user may navigate to a certain page, but it is not available currently.
When button is disabled, use a tooltip to explain why user is not allowed to go to the next page or what do they have to do to enable it.
Justified
When a button is justified, it takes up the entire available container width. By default, a button size depends on length of a label inside a button.
Size
A LinkButton has the same size props as a regular button.
Shape
Use the circle shape to display a pill-shaped link button with fully rounded corners.
Icons
Icons can be used in buttons when additional clarity is required and the icon is highly relevant to the action. Icons should not be used for decoration.
If icon indicates a direction, use directionIcon prop, which places the icon on the right side of a button.
Images
Buttons can also display an image instead of an icon.
Button groups
Use a ButtonGroup component when you need to show two or more buttons nearby.
Combinations
Primary
Secondary
Tertiary
Warning
Initial
Disabled
Loading
Guidelines
When to use
- As a call-to-action to navigate to a different page, with a purpose of creating or modifying some resource.
When not to use
- If you're navigating to an external URL that's not part of the current app, use a link instead.
Content
- Use sentence case.
- Keep button text to a few words max.
Icons
- Only use icons from Hightouch UI.
- Don't override icon size.
- Prefer outline icons over solid ones.
Sizes
- Use a justified button only inside a container with defined bounds, like a card or a dialog.
Props
LinkButton
| Name | Default | Description |
|---|---|---|
isDisabled | false | booleanToggles the disabled state. |
isJustified | false | booleanTake up an entire available container width. |
children | — | ReactNodeButton text. |
size | — | "sm" | "md" | "lg" | "xl"Determines the height of the button. |
shape | "default" | "default" | "circle"Determines the shape of the button. |
variant | "secondary" | "primary" | "secondary" | "tertiary" | "warning"Button variant, which determines the purpose the button is used for and its appearance. |
icon | — | ComponentType<SVGAttributes<SVGElement>>Primary icon that's displayed on the left. Only `icon` or `imageUrl` can be set at the same time. |
directionIcon | — | ComponentType<SVGAttributes<SVGElement>>Icon for indicating the direction, displayed on the right side of the button. Used for icons like "arrow right" or "caret down". |
imageUrl | — | stringURL to an image to display on the left. Only `icon` or `imageUrl` can be set at the same time. |