Stripe | Financial Infrastructure to Grow Your Revenue

Stripe | Financial Infrastructure to Grow Your Revenue

5282 articles

Link component for Stripe Apps


Link component for Stripe Apps

SDK version

To add the Link component to your app:

Stripe products have two types of links available: primary and secondary.

Loading example...

<Link href="https://www.stripe.com">Primary link</Link>
<Link type="secondary" href="https://www.stripe.com">
 Secondary link
</Link>
PropertyType
childrenRequired React.ReactNode The contents of the component.
cssOptional CSS | undefined Related types: CSS.
disabledOptional boolean | undefined Whether the action is disabled.
externalOptional boolean | undefined Whether linking out to an external resource.
hrefOptional string | undefined Native href attribute.
onPressOptional ((event: PressEvent) => void) | undefined Handler that is called when the press is released over the target.
relOptional string | undefined Native rel attribute.
tabIndexOptional number | undefined Overrides the default tab key behavior. Avoid using values other than -1 and 0.
targetOptional ("_self" | "_blank" | "_top" | "_parent") | undefined Where to display the linked URL, as the name for a browsing context.
typeOptional ("primary" | "secondary") | undefined The type of the Link.
classNameOptional Deprecated string | undefined

CSS

PropertyType
alignXOptional ("start" | "center" | "end" | "stretch") | undefined Horizontal alignment. See Layout properties for details.
widthOptional (number | "auto" | "fill" | "min" | "max" | "fit" | "1/2" | "1/3" | "2/3" | "1/4" | "2/4" | "3/4" | "1/5" | "2/5" | "3/5" | "4/5" | "1/6" | "2/6" | "3/6" | "4/6" | "5/6" | "1/12" | "2/12" | "3/12" | "4/12" | "5/12" | "6/12" | "7/12" | "8/12" | "9/12" | "10/12" | "11/12") | undefined The width of the component. See Sizing for details.

The primary style is the default for links. Use it whenever linking out to external resources or to other pages within the application.

Loading example...

<Link href="https://www.stripe.com">Primary link</Link>
<Link external href="https://www.example.com">
 External primary link
</Link>

Use secondary links in the following situations:

  • When a link would otherwise clash with another nearby primary button or link
  • When a page presents many items that are each a link. Because a page full of primary links could be overwhelming, we use secondary links in these cases.
  • When linking to an object like a Customer, Payment, Product, and so on. Wherever the UI refers to these objects, link them. Use the secondary style to eliminate visual clutter, as one page might link many objects. .

Loading example...

<Link type="secondary" href="https://www.stripe.com">
 Secondary link
</Link>

Loading example...

<Link disabled href="https://www.stripe.com">
 Primary link
</Link>
<Link disabled type="secondary" href="https://www.stripe.com">
 Secondary link
</Link>

Loading example...

<Link href="https://stripe.com" target="_blank">
 Open link in new tab
</Link>

Allowed href values

The href attribute supports relative and HTTP or HTTPS URLs. You can also pass a route descriptor to navigate within the Dashboard. Other values are sanitized at runtime.

See also

Last verified 2026-09-24

Is this helpful?