AddThisFeature

Link Styling System

Give links one set of rules so they read as links wherever they appear.

moderate Components & Primitives

What it adds

Defined treatments for links in prose, in navigation, in muted contexts, for external destinations, and for destructive actions.

What your agent is told to do

5
  1. 1

    Separate links by the job they do — inline prose links, navigation links, muted or secondary links, external links, and destructive ones — and give each a treatment that holds in every theme the app supports.

  2. 2

    Underline links that sit inside a paragraph of text. Colour alone is not enough to distinguish them, and a reader scanning body copy has no other signal.

  3. 3

    Mark links leaving the app for another domain, and make that marker part of the accessible name so it is announced rather than only drawn.

  4. 4

    Decide deliberately where visited styling helps and where it misleads. It is useful in documentation and search results; it is noise on a list of records where every row has been opened once.

  5. 5

    Do not render a disabled-looking link. A link that cannot be followed should either not be a link at all or should lead somewhere that explains why access is unavailable — a greyed anchor is still focusable, still clickable, and explains nothing.

Edge cases it handles

7
  • Links distinguished only by colour disappear for colourblind readers and in greyscale printing. Every link style needs a second signal, usually an underline or a weight change.
  • Visited styling applied indiscriminately makes an application look stale and can leak browsing history in shared-screen contexts, so it belongs on content links rather than on record navigation.
  • Forced-colours and high-contrast modes override custom colours but respect text decoration, so a link whose only distinction is colour becomes invisible there.
  • A link styled to look disabled remains in the tab order and remains activatable, which produces a control that appears inert and then navigates anyway.
  • Link colours must clear the contrast threshold against their own background and remain distinguishable from surrounding body text, not merely legible.
  • Underlines must not run through descenders illegibly, and must not be removed on hover in a way that makes the link harder to identify than at rest.
  • Links opening in a new tab or window must say so, since an unannounced context switch strands users who expect the back button to work.

Definition of done

8
  • Every link in the app maps to one of the defined link roles.
  • Inline prose links are distinguishable without relying on colour.
  • External links are marked visually and in their accessible name.
  • Visited styling is applied only where it was deliberately chosen.
  • No disabled-looking anchors remain; unavailable destinations are handled explicitly.
  • Link styles survive forced-colours and high-contrast modes with their distinction intact.
  • The feature matches the existing design system.
  • No existing functionality is broken.

Related features

How it works

  1. 1

    Copy the link

    Grab the Markdown instruction URL for this feature.

  2. 2

    Give it to your AI

    Paste it into Claude Code, Cursor, v0, Lovable — whatever you build with.

  3. 3

    It inspects, then implements

    Your agent reads your existing app first, then adds the feature to fit it.

Works with your stack

These instructions are written to adapt. They tell the agent to detect your framework, match your existing design system, and reuse what you already have — rather than assuming a particular stack.

Need it tighter than that? Customize the feature and tell it exactly what you're running.