Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@phase2/outline-core-link

Package Overview
Dependencies
Maintainers
9
Versions
15
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@phase2/outline-core-link

The Outline Components for the web link component

  • 0.0.6
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
68
increased by74.36%
Maintainers
9
Weekly downloads
 
Created
Source

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.

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.

Keywords

FAQs

Package last updated on 10 Aug 2023

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc