Skip to Content

Link

A brandless anchor element. No color defaults are applied — the component renders with inherited text color until tokens are provided via a modifier class.

Usage

import { Link } from '@froglet/ui' <Link href="https://example.com">Visit Example</Link> // Themed <Link href="https://example.com" className="link--brand"> Visit Example </Link>

Props

PropTypeDescription
childrenReactNodeLink content. Supports text, icons, and React nodes.
classNamestringAdditional CSS classes. Use to apply a token block.
refReact.Ref<HTMLAnchorElement>Forwarded to the underlying <a>.
...propsAnchorHTMLAttributes<HTMLAnchorElement>All standard anchor attributes.

CSS Custom Properties

TokenDefaultDescription
--link-padding0Inner spacing.
--link-font-familyinheritFont family.
--link-font-sizeinheritFont size.
--link-font-weightinheritFont weight.
--link-text-colorText color (base).
--link-text-decorationunderlineText decoration.
--link-text-color-hoverText color on hover.
--link-text-decoration-hoverText decoration on hover.
--link-text-color-activeText color when active.
--link-outline-width-focus2pxFocus outline width.
--link-outline-color-focuscurrentColorFocus outline color.
--link-outline-offset-focus2pxFocus outline offset.
--link-text-color-visitedText color for visited links.

Accessibility

  • Focus ring uses :focus-visible only — keyboard users see the ring; pointer users do not.
  • currentColor fallback on --link-outline-color-focus prevents silently removing the focus ring.
  • Native anchor semantics are preserved: href, target, rel, and all ARIA attributes pass through.
Last updated on