Skip to main content

Common Examples

import { Link } from "@servicetitan/anvil2";

function ExampleComponent() {
  return (
    <Link href="#" appearance="primary" ghost>
      Link
    </Link>
  );
}
The Link component is used in place of an HTML a anchor tag to navigate the user to a different page or website.The LinkButton component is used to create an HTML button element that is styled to look like a link. It accepts the same props as the Link component, but extends the HTML button element props rather than HTML a props.

React Accessibility

The Link component is designed to have many accessibility features by default. Some considerations remain for the developer:
  • The context for a link should be clear from the link text. In extreme cases, an aria-label should be used to give screen readers additional context.
  • The link text should be concise. Only include what is necessary to understand the context. Remember that screen readers use this text to give context.
  • Be careful when linking to full URLs. When linking to a URL, consider users with screen readers who need to hear it announced.
For more guidance on link labels and context association, see link accessibility best practices.
Last modified on January 23, 2026