Skip to main content

A semantic, accessible link component built with native HTML anchor elements and Tailwind CSS. Style hyperlinks with consistent color, hover states, and underline variants. Supports primary and neutral color schemes for navigation links, inline text links, and call-to-action elements.

Link components style anchor elements with visual hierarchy and semantic meaning. The Frutjam link system supports multiple colors, hover effects, sizes, and decoration options through Tailwind CSS utility classes. Perfect for text links, navigation, and call-to-action elements, links maintain accessibility standards with proper focus management and underline toggle options.

Class Type Description
linkBaseStyled anchor with underline and color
link-hoverStyleUnderline visible only on hover
link-xsSizeExtra small
link-smSizeSmall
link-mdSizeMedium (default)
link-lgSizeLarge
link-xlSizeExtra large
link-2xlSize2× extra large
link-primaryColorPrimary theme color
link-secondaryColorSecondary theme color
link-accentColorAccent theme color
link-neutralColorNeutral theme color
link-infoColorInfo semantic color
link-successColorSuccess semantic color
link-warningColorWarning semantic color
link-errorColorError semantic color

Basic Usage

1
<a class="link">Link</a>
1
<a className="link">Link</a>

Apply semantic link colors to match your theme or to convey meaning (such as using link-error for destructive actions or link-success for confirmation).

html
1
2
3
4
5
6
7
8
<a class="link link-primary">Primary link</a>
<a class="link link-secondary">Secondary link</a>
<a class="link link-accent">Accent link</a>
<a class="link link-success">Success link</a>
<a class="link link-info">Info link</a>
<a class="link link-warning">Warning link</a>
<a class="link link-error">Error link</a>
<a class="link link-neutral">Neutral link</a>

Scale your hyperlinks to match the surrounding typography. These utility classes range from extra small for footer "legal" text to 2X large for high-impact hero sections.

html
1
2
3
4
5
6
<a class="link link-xs">Primary link</a>
<a class="link link-sm">Secondary link</a>
<a class="link link-md">Accent link</a>
<a class="link link-lg">Success link</a>
<a class="link link-xl">Info link</a>
<a class="link link-2xl">Warning link</a>

By default, you can choose to hide the underline and only reveal it on hover. This is a common design pattern for cleaner navigation menus and dashboard sidebars.

html
1
<a class="link link-hover">Hover this link</a>