Debian Codegraph @

node/@patternfly/react-core/README.md

raw
1 # PatternFly React - Core
2
3 [![lerna](https://img.shields.io/badge/maintained%20with-lerna-green.svg?style=for-the-badge)](https://lernajs.io/)
4 [![PatternFly npm badge](https://img.shields.io/npm/v/@patternfly/react-core.svg?label=React-Core&style=for-the-badge)](https://www.npmjs.com/package/@patternfly/react-core)
5
6 This project provides the React core components for the [PatternFly project](https://patternfly.org).
7
8 **Community:** [PatternFly website](https://www.patternfly.org) | [Slack](https://slack.patternfly.org) | [Medium](https://medium.com/patternfly) | [Mailing list](https://www.redhat.com/mailman/listinfo/patternfly)
9
10 ### Table of contents
11 1. [Setup](#Setup)
12 2. [Contribution guidelines](#Contribution-guidelines)
13 3. [License](#License)
14
15 ### Setup
16 Before you begin, check out this [overview of PatternFly](http://patternfly.org/get-started/about) to get familiar with the basic elements of the design system. These instructions also assume that an existing React project is set up. For more information on how to do this, please see our main [README](https://github.com/patternfly/patternfly-react/tree/main/README.md#setup).
17
18 #### Install the @patternfly/react-core NPM package
19 * Using npm, run the following command to install:
20 ```
21 npm install @patternfly/react-core --save
22 ```
23
24 **OR**
25
26 * Using yarn, run the following command to install:
27 ```
28 yarn add @patternfly/react-core
29 ```
30
31 #### Project configuration
32 Each PatternFly component already contains the CSS related to the component. In order to have consistent styles throughout the application, PatternFly Base CSS should be used in the project, or some components may diverge in appearance. This import statement should be placed before your main application component is imported.
33
34 ```js
35 import '@patternfly/react-core/dist/styles/base.css';
36 ```
37
38 #### Example component usage
39
40 ```ts
41 import { Button } from '@patternfly/react-core';
42
43 export default <Button variant="primary">Button</Button>;
44 ```
45
46 All component documentation is available on [PatternFly.org](https://www.patternfly.org/components/about-modal).
47
48 ### Contribution guidelines
49 All React contributors must first be [PatternFly community contributors](https://www.patternfly.org/contribute/about). If you are already a PatternFly community contributor, check out the [React contribution guidelines](https://github.com/patternfly/patternfly-react/tree/main/CONTRIBUTING.md) to make React contributions.
50
51 ### License
52 PatternFly React is licensed under the [MIT License](https://github.com/patternfly/patternfly-react/tree/main/LICENSE).
53