Basic Usage
Variants
Links come in 2 visual styles:The visual style variant of the link. Primary uses the primary color, Secondary uses the secondary color.
Sizes
The size of the link text
With Icon
Whether to display a link icon that appears on hover
External Links
Navigation Links
In Navigation Menu
Props Reference
The page or URL to navigate to. Can be an internal path (e.g.,
/about) or external URL (e.g., https://example.com).Additional CSS classes for styling
Styling
From source code atreflex_ui/components/base/link.py:15-19:
- Base: Medium font weight, underline on hover, fitted width
- Icon: Positioned absolute, appears on hover with opacity transition
- Size variants control text size (xs through xl)
- Variant determines the color (primary or secondary color scale)
Implementation Details
From source code atreflex_ui/components/base/link.py:37-105:
- Extends React Router’s
Linkcomponent - Automatically validates variant and size at creation
- Icon appears 1.25rem to the right on hover
- Uses the LinkSquare02Icon from HugeIcon
- Supports all React Router Link props
- Underline offset for better visual spacing