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

@spb-web/box-overlay

Package Overview
Dependencies
Maintainers
1
Versions
7
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@spb-web/box-overlay

no dependencies, works with animated elements, simple api, typescript, modern, can highlight multiple elements

  • 0.4.1
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
4
increased by33.33%
Maintainers
1
Weekly downloads
 
Created
Source

Main Hero Magic to highlight yourself!

@spb-web/box-overlay <@spb-web/box-overlay> GitHub issues

no dependencies, works with animated elements, simple api, typescript, modern, can highlight multiple elements

Demo | Docs | Issues

npm bundle size npm bundle size npm version

It uses Size Limit to control size.

Install

npm i @spb-web/box-overlay --save

Example

const boxOverlay = new BoxOverlay()

let currentIndex = 0

const selectors = [
    ['.example-element1'],
    ['.example-element2'],
    ['.example-element3'],
    ['.example-element1', '.example-element2'],
]

setInterval(() => {
    currentIndex+=1
    currentIndex = currentIndex >= selectors.length ? 0 : currentIndex

    boxOverlay.clear()

    selectors[currentIndex].forEach(boxOverlay.add)
}, 3000)

TODO:

  • Highlight multiple elements
  • Handle moving elements
  • Rounded corner
  • Use Size Limit
  • Add events
  • Control mouse events
  • Tests
  • Animation
  • Capture mouse/touch events
  • Use clip-path
  • Centrating highlighted area
  • Optimize scroll

FAQs

Package last updated on 20 Jan 2021

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