Lumenv0.2

Components/Actions

Link

Inline navigation. A thin underline that thickens on hover — no color, no fanfare.

Default

Browse the components

Within a sentence

Lumen is open source. Read the design notes or view it on GitHub.

Props

PropTypeDefaultDescription
hrefstringDestination
externalbooleanfalseOpens in a new tab
childrenReactNodeLink text

Installation

Paste the source into components/link.tsx. No dependencies required.

'use client';

import type { AnchorHTMLAttributes } from 'react';

interface LinkProps extends AnchorHTMLAttributes<HTMLAnchorElement> {
  href: string;
  external?: boolean;
}

export function Link({ href, external = false, style, children, ...props }: LinkProps) {
  return (
    <a
      href={href}
      target={external ? '_blank' : undefined}
      rel={external ? 'noopener noreferrer' : undefined}
      onMouseEnter={(e) => {
        e.currentTarget.style.textDecorationThickness = '1px';
      }}
      onMouseLeave={(e) => {
        e.currentTarget.style.textDecorationThickness = '0.5px';
      }}
      style={{
        color: 'var(--color-text)',
        fontFamily: 'var(--font-sans)',
        fontWeight: 420,
        textDecoration: 'underline',
        textUnderlineOffset: '3px',
        textDecorationThickness: '0.5px',
        ...style,
      }}
      {...props}
    >
      {children}
    </a>
  );
}

Built from Lumen tokens. Edit the tokens