npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@lovo/matter-react

v1.0.0

Published

React binding for Matter — MatterScene, useShaderMaterial, input hooks.

Readme

@lovo/matter-react

React binding for Matter — shader components on WebGPU + Three.js TSL.

This package wraps the engine (@lovo/matter) with React-friendly primitives: a shared <ShaderScene> canvas, a useShaderMaterial hook for @react-three/fiber integration, and input hooks (useCursor, useScroll).

Install

npm install @lovo/matter @lovo/matter-react react three

react (^19), @lovo/matter, and three (^0.170) are peer dependencies.

Three rendering modes

Matter components work in three configurations:

  1. Drop-in — each component manages its own canvas. Simplest path; one canvas per effect.
  2. Shared scene — wrap multiple Matter components in a single <ShaderScene> to share one canvas (faster, layered effects).
  3. Inside @react-three/fiber — use useShaderMaterial directly inside a r3f <Canvas> you already own.

Minimal usage (Mode 2: shared scene)

import { ShaderScene } from '@lovo/matter-react'
// LinearGradient is copy-pasted into your project via @lovo/matter-cli
import { LinearGradient } from '@/components/matter/linear-gradient'

export default function Hero() {
  return (
    <ShaderScene>
      <LinearGradient colors={['#0b0c2a', '#1d1f57', '#7d2dff']} angle={120} />
    </ShaderScene>
  )
}

Getting components

Polished drop-in components (<LinearGradient>, <Aurora>, <DotField>, <SimplexNoise>, <MeshGradient>, <Waves>) ship via the shadcn-style copy-paste CLI. Install it once:

npm install -D @lovo/matter-cli
npx matter-cli init
npx matter-cli add linear-gradient

The component lands in src/components/matter/linear-gradient.tsx and is yours to edit.

Docs

https://github.com/lovo-hq/matter

Migration from 0.3.x

MatterScene, MatterMonitor, useMatterContext, and related types have been renamed to ShaderScene, ShaderMonitor, useShaderContext, ShaderContextValue, etc. The old names are deprecated and still work — remove them at your leisure before 0.5.0.

License

MIT — see LICENSE.