🚀 DAY 5 OF LAUNCH WEEK: Introducing Socket Firewall Enterprise.Learn more →
Socket
Book a DemoInstallSign in
Socket

react-now-you-see-me

Package Overview
Dependencies
Maintainers
10
Versions
47
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

react-now-you-see-me

A React component for determining when an element is within a given threshold of the viewport, horizontally.

latest
Source
npmnpm
Version
1.5.26
Version published
Maintainers
10
Created
Source

react-now-you-see-me

A React component for determining when an element is within a given threshold of the viewport, horizontally.

  • Demo
  • Repo

npm version CircleCI Known Vulnerabilities Coverage Status

Installation

npm i react-now-you-see-me

You'll also need React and ReactDOM peer dependencies: npm i react react-dom.

Usage

import * as React from 'react'
import InView from 'react-now-you-see-me'

const Foo = (props) => (
  <SomeCarouselComponent>
    {someSlides.map((_, i) =>
      <InView key={i} threshold={0} boundingLeft={100} boundingRight={100}>
        {(isInView) =>
          isInView
            ? <span>I am totally in view right now, awesome!</span>
            : <span>You can't see me :(</span>
        }
      </InView>
    )}
  </SomeCarouselComponent>
)

LICENSE

MIT

Keywords

in-view

FAQs

Package last updated on 11 May 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