Security News
Research
Data Theft Repackaged: A Case Study in Malicious Wrapper Packages on npm
The Socket Research Team breaks down a malicious wrapper package that uses obfuscation to harvest credentials and exfiltrate sensitive data.
@studio-freight/react-lenis
Advanced tools
[![Bibliotheca](https://assets.studiofreight.com/bibliotheca/header.png)](https://github.com/studio-freight/bibliotheca)
react-lenis creates and manages an instance of the Lenis. It takes in a root prop and an options object that is spread into the Lenis constructor.
If root
is true, <ReactLenis>
will be the root Lenis instance and all other <ReactLenis>
components in the app will get the instance from the context. If root
is false, the component will create a new Lenis instance and provide it via the context. It's recommended to only have one <ReactLenis root>
component in your app.
For npm users:
npm i @studio-freight/react-lenis
For yarn users:
yarn add @studio-freight/react-lenis
import { Lenis as ReactLenis, useLenis } from '@studio-freight/react-lenis'
function Layout() {
const lenis = useLenis(({scroll}) => {
// called every scroll
})
return (
<ReactLenis root options={{ ...options }}>
{/* Your scrollable website */}
</ReactLenis>
)
}
The options
object is passed directly to the Lenis instance, check their readme for reference
Once the Lenis context is set (components mounted inside <ReactLenis>
) you can use these handy hooks:
useLenis
is a hook that returns the Lenis instance
The hook takes three argument:
microbundle
after running build:bundled
script. Includes all external dependencies.microbundle
after running build:dist
script.
tsc
after running build:types
script.vite
through dev
script to serve the documentation.@studio-freight/compono Our Next.js/React component library.
@studio-freight/satus Our starter kit.
This tool is maintained by the Studio Freight Darkroom team:
FAQs
![NPM Version](https://img.shields.io/npm/v/%40studio-freight%2Freact-lenis?colorA=000000&colorB=ff98a2) ![NPM Downloads](https://img.shields.io/npm/dm/%40studio-freight%2Freact-lenis?colorA=000000&colorB=ff98a2)
The npm package @studio-freight/react-lenis receives a total of 7,996 weekly downloads. As such, @studio-freight/react-lenis popularity was classified as popular.
We found that @studio-freight/react-lenis demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 5 open source maintainers collaborating on the project.
Did you know?
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.
Security News
Research
The Socket Research Team breaks down a malicious wrapper package that uses obfuscation to harvest credentials and exfiltrate sensitive data.
Research
Security News
Attackers used a malicious npm package typosquatting a popular ESLint plugin to steal sensitive data, execute commands, and exploit developer systems.
Security News
The Ultralytics' PyPI Package was compromised four times in one weekend through GitHub Actions cache poisoning and failure to rotate previously compromised API tokens.