KbqLink

componentCopy link to KbqLink

Link of the design system. Applied to an <a> with a href, so that the browser keeps treating it as a link, or to any other element, which makes it a pseudo link that acts as a button. The component renders the text between the kbqLinkPrefix and kbqLinkSuffix content, and only the text is underlined.

@Component({ selector: '[kbqLink]', exportAs: 'kbqLink' })
class KbqLink {
readonly disabled = input<boolean>(false);
readonly pseudo = input<boolean>(false);
readonly external = input<boolean>(false);
readonly underline = input<KbqLinkUnderline>();
readonly size = input<KbqDefaultSizes>(this.options.size);
readonly useVisited = input<boolean>(this.options.useVisited);
readonly print = input<string | null>();
focus(): void;
getHostElement(): HTMLElement;
}

KbqLinkPrefix

directiveCopy link to KbqLinkPrefix

Marks content to be projected before the text of a link, such as a leading icon.

@Directive({ selector: '[kbqLinkPrefix]' })
class KbqLinkPrefix {}

KbqLinkSuffix

directiveCopy link to KbqLinkSuffix

Marks content to be projected after the text of a link: a trailing icon, or the punctuation that ends a sentence, which takes the link color without the underline. It wraps to the next line together with the last word only.

@Directive({ selector: '[kbqLinkSuffix]' })
class KbqLinkSuffix {}

kbqLinkOptionsProvider

functionCopy link to kbqLinkOptionsProvider

Overrides the default link options within the given injector scope: the whole application from bootstrapApplication, or one subtree from the providers of a component or a route.

function kbqLinkOptionsProvider(
options: Partial<KbqLinkOptions>
): Provider;

KbqLinkOptions

typeCopy link to KbqLinkOptions

Settings a whole application shares, rather than something a single link decides: how big links are, when they are underlined and whether visited ones stand out. Where a link leads and how it behaves stay on the link itself.

type KbqLinkOptions = {
size: KbqDefaultSizes;
underline?: KbqLinkUnderline;
useVisited: boolean;
};
sizeCopy link to sizeKbqDefaultSizes

Size of a link: its typography and the gaps to its icons.

underlineoptionalCopy link to underlineKbqLinkUnderline

When the text of a link and of a pseudo link is underlined. Unset, a link is always underlined and a pseudo link only on hover.

useVisitedCopy link to useVisitedboolean

Whether a visited link is styled differently.

KbqLinkUnderline

typeCopy link to KbqLinkUnderline

When the text of a link is underlined: always, only while the pointer is over the link, or never.

type KbqLinkUnderline = 'always' | 'hover' | 'none';

KBQ_LINK_OPTIONS

constCopy link to KBQ_LINK_OPTIONS

Injection token holding the current KbqLinkOptions.

const KBQ_LINK_OPTIONS: InjectionToken<KbqLinkOptions>;
Suggestions for improvement
If you found a mistake or want to improve the article, create an issue on GitHub.