
Security News
/Research
Popular node-ipc npm Package Infected with Credential Stealer
Socket detected malicious node-ipc versions with obfuscated stealer/backdoor behavior in a developing npm supply chain attack.
@micrio/client-react
Advanced tools
Micrio is a platform for creating interactive, high-resolution image experiences. This NPM package (@micrio/client-react) provides a React component that wraps the core Micrio Client JS library (Github), making it easy to integrate Micrio viewers into your React applications.
It's fully Typescript-compatible, offering a great development experience for Typescript-React projects.
If you are looking for HOWTOs, tutorials, or general Micrio help, please check out our searchable Knowledge Base.
>=18.17.0^18.0.0^18.0.0npm i @micrio/client-react
import React from 'react';
import { Micrio } from '@micrio/client-react';
const App = () => {
return (
<div style={{ width: '800px', height: '600px' }}>
<Micrio id="aBcDeFg" /> {/* Replace with your Micrio Image ID */}
</div>
);
};
export default App;
You can pass event handlers directly as props. The available events are documented in the Micrio Client Events documentation.
import React, { useCallback } from 'react';
import { Micrio } from '@micrio/client-react';
const App = () => {
return (
<div style={{ width: '800px', height: '600px' }}>
<Micrio
id="aBcDeFg"
onShow={e => {
const micrioInstance = e.detail;
console.log('Micrio show', micrioInstance.$current?.camera.flyToCoo([0.5, 0.5]));
}}
/>
</div>
);
};
export default App;
Pass initial runtime settings as props. See the Micrio Client Runtime Settings documentation for all available options.
import React from 'react';
import { Micrio } from '@micrio/client-react';
const App = () => {
return (
<div style={{ width: '800px', height: '600px' }}>
<Micrio
id="aBcDeFg" // Replace with your Micrio Image ID
dataUi={false} // Example: Start with UI hidden
/>
</div>
);
};
export default App;
The <Micrio /> component accepts the following key props:
id (string, required): The Micrio Image ID.className (string, optional): CSS class name for the container div.style (object, optional): Inline styles for the container div. Defaults to { width: '100%', height: '100%' }.onShow, onPreData, onZoom, onTourStart). The onShow handler receives the MicrioInstance as its argument.dataUi, dataLogo, dataPath). Refer to the Micrio documentation for details.Almost all Micrio-specific runtime props are applied only when the component mounts. The underlying Micrio client does not support dynamically changing most of these settings after initialization. If you need to change a setting like dataUi from false to true, you will need to unmount and remount the <Micrio /> component with the new prop value. The id prop can be changed dynamically, which will load a new Micrio image. The muted prop can also be changed, muting/unmuting audio in the element.
Contributions are welcome! Please follow these steps:
npm installnpm run dev (available at http://localhost:2000)npm run buildnpm run dev and that the code is formatted correctly.Feel free to open an issue for bug reports or feature requests.
This project is licensed under the MIT License. See the LICENSE file for details.
FAQs
Wrapper for the Micrio client library for React.
We found that @micrio/client-react demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 2 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
Socket detected malicious node-ipc versions with obfuscated stealer/backdoor behavior in a developing npm supply chain attack.

Security News
TeamPCP and BreachForums are promoting a Shai-Hulud supply chain attack contest with a $1,000 prize for the biggest package compromise.

Security News
Packagist urges PHP projects to update Composer after a GitHub token format change exposed some GitHub Actions tokens in CI logs.