Unkey
Components

InlineLink

A component for creating inline links with optional icons and styling.

The InlineLink component provides a consistent way to create inline links within text content. It supports icons, custom styling, and target attributes.

Basic Usage

The basic InlineLink includes a label and href.

This is a basic inline link in a paragraph.

With Icon

Add an icon to the link, positioned either on the left or right.

This is an inline link with an icon on the right and on the left.

With Target

Open the link in a new tab.

This is an inline link that opens in a new tab.

With Custom Styling

Apply custom styling to the link.

This is an inline link with custom styling.

Features

  • Consistent link styling
  • Optional icon support
  • Configurable icon position
  • Custom styling support
  • Target attribute for new tab opening
  • Accessible by default

Props

PropTypeDefaultDescription
hrefstringrequiredThe URL the link points to
labelstringrequiredThe text content of the link
iconReact.ReactNodeundefinedOptional icon to display with the link
iconPosition"left" | "right""right"Position of the icon relative to the label
classNamestringundefinedAdditional CSS classes
targetbooleanundefinedWhether to open the link in a new tab

Accessibility

  • Proper ARIA attributes
  • Keyboard navigation support
  • High contrast text for readability
  • Clear focus indicators
  • Semantic HTML structure
  • Descriptive link text

On this page