Security News
cURL Project and Go Security Teams Reject CVSS as Broken
cURL and Go security teams are publicly rejecting CVSS as flawed for assessing vulnerabilities and are calling for more accurate, context-aware approaches.
@pixi/react
Advanced tools
Simply the best way to write PIXI applications in React
Write PIXI applications using React declarative style 👌
Pixi React is an open-source, production-ready library to render high performant PIXI applications in React.
We're delighted to announce Pixi React v7.0.0, the first major release since making it an official Pixi package!
While all the core components remain the same, there have been some significant changes under the hood:
createRoot
API, matching the signature of React 18's ReactDOM/client
@pixi/react
and @pixi/animated
packagespixi.js
library imports were replaced with @pixi/
scoped package versions, providing bundlesize improvements for users who use modular builds@pixi/react-legacy
and @pixi/react-animated-legacy
packages, with rendering deferred to a user's installed pixi.js
packagesideEffects: false
added to package.json
to support tree-shakingWe're excited to see what the community builds with the library and as ever please let us know on GitHub if you run into any issues, or reach out to us on the Discord to chat.
Thanks! PixiJS Team
If you want to start a new React project from scratch, we recommend Create React App. To add to an existing React application, just install the dependencies:
# for typescript add "--template typescript"
npx create-react-app my-app
cd my-app
npm install pixi.js @pixi/react
import { BlurFilter } from 'pixi.js';
import { Stage, Container, Sprite, Text } from '@pixi/react';
import { useMemo } from 'react';
export const MyComponent = () =>
{
const blurFilter = useMemo(() => new BlurFilter(4), []);
return (
<Stage>
<Sprite
image="https://pixijs.io/pixi-react/img/bunny.png"
x={400}
y={270}
anchor={{ x: 0.5, y: 0.5 }}
/>
<Container x={400} y={330}>
<Text text="Hello World" anchor={{ x: 0.5, y: 0.5 }} filters={[blurFilter]} />
</Container>
</Stage>
);
};
Check out our documentation for guides and a full API reference.
Or checkout our examples on codepen for inspiration.
Want to contribute to Pixi React? Our contributing guide has you covered.
Pixi React is MIT licensed.
This projects codebase was originally forked from @michalochman 's react-pixi-fiber.
You have an amazing feature in mind or just want to get in touch with other developers? Feel free to join our Discord channel.
FAQs
Write PixiJS applications using React declarative style.
We found that @pixi/react demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 4 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
cURL and Go security teams are publicly rejecting CVSS as flawed for assessing vulnerabilities and are calling for more accurate, context-aware approaches.
Security News
Bun 1.2 enhances its JavaScript runtime with 90% Node.js compatibility, built-in S3 and Postgres support, HTML Imports, and faster, cloud-first performance.
Security News
Biden's executive order pushes for AI-driven cybersecurity, software supply chain transparency, and stronger protections for federal and open source systems.