0.0.16 • Published 2 months ago

@phase2/outline-core-link v0.0.16

Weekly downloads
-
License
BSD-3-Clause
Repository
github
Last release
2 months ago

outline-core-link

The Outline Core Link component

Properties

PropertyTypeDescription
linkHrefstringLink url
linkRelLinkRelTypeLink rel
linkTargetLinkTargetTypeLink target
linkTextstringLink text

Methods

MethodTypeDescription
isURLExternal(url: string): booleanCheck to see if the link is external, pass target="_blank" and rel="external" if so. Returns true if the link is external.
linkRelRender(): string \| undefinedYou can override Rel manually, but if not, we'll set it to "noreferrer noopener" if the link is external.Tabnabbing vulnerability 🤯TLDR: when a link has the attribute target="_blank", always add ref="noreferrer noopener"https://cheatsheetseries.owasp.org/cheatsheets/HTML5_Security_Cheat_Sheet.html#tabnabbing
linkTargetRender(): string \| undefinedYou can override target manually, but if not, we'll set it to "_blank" if the link is external.

Slots

NameDescription
The default slot for this element.

CSS Custom Properties

PropertyDescription
--outline-core-link-colordefault: The default link color.
--outline-core-link-color-defaultdecoration: Text decoration for the default link.
--outline-core-link-color-hoverdecoration: Text decoration for the link when hovering.
--outline-core-link-transitionproperty: The CSS transition property to use for the link.
--outline-core-link-transition-timingfunction: The CSS transition timing function to use for the link.

outline-core-link

The Outline Core Link component

Properties

PropertyAttributeTypeDescription
linkHreflink-hrefstringLink url
linkRellink-relLinkRelTypeLink rel
linkTargetlink-targetLinkTargetTypeLink target
linkTextlink-textstringLink text

Methods

MethodTypeDescription
isURLExternal(url: string): booleanCheck to see if the link is external, pass target="_blank" and rel="external" if so. Returns true if the link is external.
linkRelRender(): string \| undefinedYou can override Rel manually, but if not, we'll set it to "noreferrer noopener" if the link is external.Tabnabbing vulnerability 🤯TLDR: when a link has the attribute target="_blank", always add ref="noreferrer noopener"https://cheatsheetseries.owasp.org/cheatsheets/HTML5_Security_Cheat_Sheet.html#tabnabbing
linkTargetRender(): "_blank" \| "_self" \| "_parent" \| "_top" \| undefinedYou can override target manually, but if not, we'll set it to "_blank" if the link is external.

Slots

NameDescription
The default slot for this element.

CSS Custom Properties

PropertyDescription
--outline-core-link-colordefault: The default link color.
--outline-core-link-color-defaultdecoration: Text decoration for the default link.
--outline-core-link-color-hoverdecoration: Text decoration for the link when hovering.
--outline-core-link-transitionproperty: The CSS transition property to use for the link.
--outline-core-link-transition-timingfunction: The CSS transition timing function to use for the link.
0.0.15

2 months ago

0.0.16

2 months ago

0.0.12

3 months ago

0.0.13

3 months ago

0.0.14

3 months ago

0.0.11

3 months ago

0.0.10

3 months ago

0.0.9

3 months ago

0.0.8

3 months ago

0.0.3

10 months ago

0.0.5

10 months ago

0.0.4

10 months ago

0.0.7

9 months ago

0.0.6

10 months ago

0.0.2

12 months ago