Link

A styled anchor element for navigation

Installation#

npmpnpmyarnbun
npx sugarcoat add link

Examples#

Default#

Default

Colors#

Links support multiple color options.

Colors

With Underline#

Enable underline for clearer link indication.

Underline

In Text Context#

In Paragraph
Navigation
Footer Style
External Links
Breadcrumbs
With Icons
Card Footer

Inline Actions#

Inline Actions

Usage#

Import
import { Link } from "@sugarcoat/ui-nxt";
Usage
<Link href="/about" color="primary" underline>
About Us
</Link>

// External link
<Link 
href="https://example.com" 
target="_blank" 
rel="noopener noreferrer"
>
External Site ↗
</Link>

Props#

PropTypeDefaultDescription
hrefstring-URL the link points to
color"default" | "primary" | "accent" | "success" | "danger""default"Color of the link
underlinebooleanfalseWhether to show underline decoration
targetstring-Where to open the linked URL (e.g., '_blank')
relstring-Relationship between current and linked document
childrenReactNode-Link text content

Accessibility#

  • Uses native <a> element for full accessibility support
  • Proper focus styles for keyboard navigation
  • When using target="_blank", always include rel="noopener noreferrer"
  • Link text should be descriptive (avoid "click here")
  • Color alone should not be the only way to identify links - consider using underline
  • External link indicators help users understand link behavior
Customize Theme
Build your own sugarcoat/ui theme
PresetLime / Violet / Slate
Brand ColorLime
Accent ColorViolet
Gray ScaleSlate
Border RadiusLg