# react-on-screen **Repository Path**: mirrors_fkhadra/react-on-screen ## Basic Information - **Project Name**: react-on-screen - **Description**: Check if a react component in the viewport - **Primary Language**: Unknown - **License**: MIT - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2020-08-08 - **Last Updated**: 2026-01-24 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # React on screen []() []() []() [](https://coveralls.io/github/fkhadra/react-on-screen?branch=master) 😎 Check if your react component are visible on the screen without pain and with performance in mind 😎!  - [React on screen ![npm]() ![npm]() ![license]() ](#react-on-screen-npm-npm-license-coverage-statushttpscoverallsiogithubfkhadrareact-on-screenbranchmaster) - [Demo](#demo) - [Installation](#installation) - [Usage](#usage) - [Simple](#simple) - [Using a render props](#using-a-render-props) - [Track the visibility only once](#track-the-visibility-only-once) - [Defining offset](#defining-offset) - [Partial visibility](#partial-visibility) - [Use the html tag of your choice](#use-the-html-tag-of-your-choice) - [Api](#api) - [Contributions](#contributions) - [License](#license) ## Demo View the [demo](https://fkhadra.github.io/react-on-screen/demo-react-on-screen.html). ## Installation ``` $ npm install --save react-on-screen $ yarn add react-on-screen ``` A UMD build is also available : ```html ``` ## Usage ### Simple ```javascript import React from 'react'; import TrackVisibility from 'react-on-screen'; const ComponentToTrack = ({ isVisible }) => { const style = { background: isVisible ? 'red' : 'blue' }; return