Link
A link widget provides an interactive reference to a resource, which can be external or within the current page or application. It is a versatile component that can be used in various contexts, such as navigation menus, breadcrumbs, and inline text links.
Code Editor
Features
Supports different variants
Can contain text, or text with an icon
Supports disabled state
Accepts custom attributes and className
Assigns the correct HTML tag
Reference Links
ARIA design pattern
Anatomy
Import all parts and combine them together.
import { Link } from '@umrel/umrel';
import type { LinkProps } from '@umrel/umrel';
<Link href='https://umrel.com' attributes={{ target: '_blank' }}>
Umrel
</Link>
Variant
Link component has two variants: and . The variant is the default style for links, and it adds an underline to the text. The variant removes the underline from the text.
underline
plain
underline
plain
Code Editor
Color
The color of the link can be customized using the property. The property accepts the following values: props table.
color
color
Code Editor
Icon
Icon can be added to the link using the property.
icon
Code Editor
State
Link has state that can be used to prevent users from clicking on the link.
disabled
Code Editor
Accessibility
Link follows the WAI-ARIA Link design pattern to ensure that it is accessible to all users.
Keyboard Interactions
Key | Description |
---|---|
Enter Space | Executes the link and moves focus to the link target |