fast-anchor

fast-anchor is a web component implementation of an HTML anchor element. The fast-components anchor supports the same visual appearances as the button component (accent, lightweight, neutral, outline, stealth) as well as a hypertext appearance for use inline with text.

Usage

Live Editor
Result
FAST

Applying custom styles

import { customElement } from "@microsoft/fast-element";
import { Anchor, AnchorTemplate as template } from "@microsoft/fast-foundation";
import { MyAnchorStyles as styles } from "./anchor.styles";
@customElement({
name: "fast-anchor",
template,
styles,
shadowOptions: {
delegatesFocus: true,
},
})
export class FASTAnchor extends Anchor {}
note

This component is built with the expectation that focus is delegated to the anchor element rendered into the shadow DOM.