@carbon/utilities-react
v0.32.0
Published
Utilities and helpers to drive consistency across software products using the Carbon Design System with React
Readme
@carbon/utilities-react
Utilities and helpers to drive consistency across software products using the Carbon Design System with React
Getting started
To install @carbon/utilities-react in your project, you will need to run the
following command using npm:
npm install @carbon/utilities-reactIf you prefer Yarn, use the following command instead:
yarn add @carbon/utilities-reactMaintainer information
This package uses a convention-based multi-entry build. The supported public API consists of two parts.
- The root entrypoint
import { utility } from '@carbon/utilities-react';- Any top-level module with a
src/<name>/index.*file
import { utility } from '@carbon/utilities-react/utility';Review the architecture decision record (ADR) for more detail on how and why this approach is used.
Adding a utility
- Create a new top-level directory under
src/ - Export the public API for that utility from
src/<name>/index.ts,index.tsx,index.js, orindex.jsx - Re-export it from
src/index.tsif it should also be available from the package root - Build the package and verify the generated outputs under
es/<name>/index.*andlib/<name>/index.js
src/
someReactUtility/
index.tsx
someReactUtility.tsx🙌 Contributing
We're always looking for contributors to help us fix bugs, build new features, or help us improve the project documentation. If you're interested, definitely check out our Contributing Guide! 👀
📝 License
Licensed under the Apache 2.0 License.
IBM Telemetry
This package uses IBM Telemetry to collect de-identified and anonymized metrics data. By installing this package as a dependency you are agreeing to telemetry collection. To opt out, see Opting out of IBM Telemetry data collection. For more information on the data being collected, please see the IBM Telemetry documentation.
