Componentsv2.189.1
Iconsv1.19.0
MCPv0.8.62
Tokensv0.34.3

Links are used to navigate to a new location, open or download an asset, or serve as an inline action.

For more details on how to set up the link component on PlumaProvider, visit the provider's docs.

Usage

Link works just like PlainLink:

import { Link } from '@customerio/pluma-components/react';
Loading editor

The isExternal prop is automatically inferred from the URL (http://, https://, mailto:, tel:), but you can still explicitly set it if needed:

Loading editor

Primary

Underlined

To render the component in the "underlined" variant, use the isUnderlined prop:

Loading editor

Secondary

To render the component in the "secondary" variant, use the variant prop.

Loading editor

Underlined

To render the component without an underline, use the isUnderlined prop:

Loading editor

Icons

A Link can also be rendered with an icon, for example:

Loading editor

The icon can be placed on either side of the text via the iconPosition prop (by default, leading):

Loading editor

Custom icons

If you need to use a custom icon that isn't part of the Pluma Icon set, you can use the iconSrc prop to provide a URL to an image. The image will be automatically sized to match the button's icon size:

Loading editor

Custom image icons support the same positioning options as standard icons:

Loading editor

Loading editor

Loading editor

You may sometimes need to render a button tag that's styled like the Link component. For example, you might want to render a clickable button inside a paragraph, which will perform an action on click (rather than navigating somewhere).

To do so, pass in the onClick prop to the Link component:

Loading editor

API