npm.io
1.9.1-react19 • Published 1 week ago

@trimble-oss/moduswebcomponents-react

Licence
MIT
Version
1.9.1-react19
Deps
2
Size
528 kB
Vulns
0
Weekly
0

Modus React Components

About

This is a React wrapper library for Modus Web Components 2.0 and the components were programmatically generated using the Stencil for React v19.1.

Installation

Install the Modus React Components Library using npm:

npm install @trimble-oss/moduswebcomponents-react@<latest-version>-react<target-version>
# e.g.,
npm install @trimble-oss/moduswebcomponents-react@1.0.0-react19

Import our styling in your main JavaScript or CSS file:

import "@trimble-oss/moduswebcomponents/modus-wc-styles.css";

Example Usage

You can use the components as you would any other React component.

  • Use a Modus Button in your App.tsx

    <ModusWcButton color="primary">Primary Button</ModusWcButton>

Usage Notes

If you are using Vite, you cannot use plugin-react-swc with this library. You will need to use the default Vite React plugin. This is due to parts of the plugin being unimplemented on the SWC side, and will fail for production builds.