# SbLink Styled anchor element for navigation with support for external links, underline styles, and colors. ## Parameters | Parameter | Type | Default | Description | |-----------|------|---------|-------------| | Href | string? | null | The URL to navigate to | | Target | string? | null | Link target (_blank, _self, etc.) | | Rel | string? | null | Custom rel attribute | | Disabled | bool | false | Whether the link is disabled | | External | bool | false | Shows external link indicator icon | | Color | SbColor | Primary | Link color (Default, Primary, Secondary, Success, Warning, Danger, Info, Muted) | | Underline | SbLinkUnderline | Hover | Underline behavior (Always, Hover, None) | | Class | string? | null | Additional CSS classes | | Style | string? | null | Inline styles | | AdditionalAttributes | Dictionary? | null | Additional HTML attributes (e.g. aria-*, data-*) | ## Events | Event | Type | Description | |-------|------|-------------| | OnClick | EventCallback | Fired when the link is clicked | ## Templates / Slots (RenderFragments) | Slot | Type | Description | |------|------|-------------| | ChildContent | RenderFragment | The link text or content | ### Template Usage Examples #### Basic Link ```razor About Us ``` #### With Custom Content ```razor View Profile ``` ## CSS Classes - `sb-link` - Base class - `sb-link--primary` - Primary color - `sb-link--secondary` - Secondary color - `sb-link--success` - Success color - `sb-link--warning` - Warning color - `sb-link--danger` - Danger color - `sb-link--info` - Info color - `sb-link--muted` - Muted color - `sb-link--default` - Default color - `sb-link--underline-always` - Always show underline - `sb-link--underline-hover` - Underline on hover - `sb-link--underline-none` - No underline - `sb-link--disabled` - Disabled state - `sb-link--external` - External link styling ## Accessibility - Uses native `` element - `aria-disabled` set when disabled - `tabindex="-1"` when disabled to remove from tab order - `rel="noopener noreferrer"` automatically added for external links and `target="_blank"` - External link indicator is hidden from screen readers ## Examples ### Basic Usage ```razor Go Home ``` ### External Link ```razor GitHub ``` ### Colors ```razor Primary Secondary Success Danger Muted ``` ### Underline Styles ```razor Always Underlined Underline on Hover No Underline ``` ### Disabled Link ```razor Admin (Restricted) ``` ### In Text ```razor For more information, please visit our help center or contact us. ``` ### With Click Handler ```razor Click me to track @code { private void HandleLinkClick(MouseEventArgs args) { // Track click analytics } } ```