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

@codin/cwc-intersection

Package Overview
Dependencies
Maintainers
1
Versions
11
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@codin/cwc-intersection

Panel that implements intersection observer, triggers events when intersecting

  • 0.3.2
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
1
Maintainers
1
Weekly downloads
 
Created
Source

npm version

Intersection Element

Element for detecting intersection.

properties

disabled?: bool: false, reflect: true

When disabled the intersection adapter is removed

once?: bool: false

If true, the element wil await first intersection, then set it self as diabled.

margin?: string

Intersection offset, just like normal css margins.

threshold?: string|float[]

Decimal or CSV decimals .1,.5,.9 when used from html. flaot array when set by JS

Events

  • intersection triggerd when intersection
  • intersect-in triggerd when intersecting
  • intersect-out triggerd when not intersecting

Example

<style>
 cwc-intersection {
  border: 1px solid black;
  opacity: .5;
 }
 cwc-intersection[intersected] {
  border-color: red;
 }
 cwc-intersection[intersecting] {
  opacity: 1;
 }
</style>
<cwc-intersection treshold="1">
 <span>Foo Bar</span>
</cwc-intersection>

FAQs

Package last updated on 02 May 2020

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