@carbon/ibmdotcom-patterns-reactdeprecated

IBM.com Library React Patterns

Usage no npm install needed!

<script type="module">
  import carbonIbmdotcomPatternsReact from 'https://cdn.skypack.dev/@carbon/ibmdotcom-patterns-react';
</script>

README

@carbon/ibmdotcom-patterns-react

A collection of IBM.com patterns implemented using React and Carbon.

Getting Started

Run the following command using npm:

npm i @carbon/ibmdotcom-patterns-react

If you prefer Yarn, use the following command instead:

yarn add @carbon/ibmdotcom-patterns-react

NOTE: Carbon dependencies will be managed by the IBM.com Library starting in v1.3.0. For earlier versions, Carbon dependencies will have to be installed separately:

yarn add carbon-components carbon-components-react carbon-icons
  1. These components require the use of Webpack in your project. See our webpack.config.js for an example configuration.

  2. Components do not import any of the styles themselves, use the scss or css from @carbon/ibmdotcom-styles to bring in styling.

  3. For older browsers (e.g. IE11), polyfills listed in packages/patterns-react/.storybook/polyfills.js file is required.

Usage

List of Available Components

View available React Patterns here. You can see usage information in several ways:

  1. Clicking the blue Show Info icon in the top right corner of the selected component. You can see the list of available React props
  2. Clicking the STORY tab at the bottom. This tab contains the code that shows how the component is being used
  3. Clicking the KNOBS tab at the bottom and changing values there. Most knobs are shown as something like Button kind (kind), where kind is the name of React prop
  4. Clicking the ACTION LOGGER tab at the bottom and interacting with the selected component. You may see something like onClick which typically indicates that the event handler (React prop) with the same name is called. You can also expand the twistie to see the details of the event
  5. Clicking the README tab at the bottom. You can see some more document for some components

Documentation

  • See our documentation site here for full how-to docs and guidelines
  • Contributing: Guidelines for making contributions to this repo.

🙌 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 and our Developer Guide! 👀

📝 License

Licensed under the Apache 2.0 License.