Link Component
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 |
|---|---|---|
| link | Base | Styled anchor with underline and color |
| link-hover | Style | Underline visible only on hover |
| link-xs | Size | Extra small |
| link-sm | Size | Small |
| link-md | Size | Medium (default) |
| link-lg | Size | Large |
| link-xl | Size | Extra large |
| link-2xl | Size | 2× extra large |
| link-primary | Color | Primary theme color |
| link-secondary | Color | Secondary theme color |
| link-accent | Color | Accent theme color |
| link-neutral | Color | Neutral theme color |
| link-info | Color | Info semantic color |
| link-success | Color | Success semantic color |
| link-warning | Color | Warning semantic color |
| link-error | Color | Error semantic color |
Basic Usage
Link Colors
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).
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> |
Link Sizes
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.
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> |
Link Hover State
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.