1.1.0-beta-7 • Published 5 months ago

@capgeminiuk/dcx-react-library v1.1.0-beta-7

Weekly downloads
-
License
MIT
Repository
github
Last release
5 months ago

CircleCI

DCX React library

Motivation

dcx-react-library is a React library with a set of components ready to use in your project.
There are plenty of libraries available in React that can help to increase your productivity however most of them contain lots of css and are hard to style based on your project's requirements.
dcx-react-library is UI/UX agnostic, this allows the dcx-react-library to be easily integrated into any project.
You have few options to make your components good looking :lipstick::

  1. You can provide the styling to match the look and feel of your application passing the class to every component :construction_worker:
  2. :fire: :fire:You can use the design system tokens that we built for you - from version 1.0.0 :fire: :fire:

Components

To see the full list of components built in dcx-react-library, and how to use it, have a look on our storybook-showcase In Storybook, each component is presented with 4 main sections:

  • documentation: describes the list of properties available, optional and mandatory;
  • live: you can play directly with all the properties and see the component's behaviour;
  • unstyled: the bare component without any styling applied;
  • styled: an example (mainly based on GDS) of how to style the component and the final result.
  • design system: an example of how to style the component using the tokens exposed by the design system.

How to use it

Using dcx-react-library should not require any particular setup.
You only need to import the component and use it :smiley:

Steps:

  • yarn add @capgeminiuk/dcx-react-library
  • Import the component you need and use it. For example:
import { Button } from '@capgeminiuk/dcx-react-library';

const App = () => {
  return <Button label="start" onClick={() => {}} />;
};

Styling

We don't ship dcx-react-library with any included CSS. However, some stylesheet is required to use some components (for example, toggle and tooltip).

/* The following line can be included in your src/index.js or App.js file */
import '@capgeminiuk/dcx-react-library/dist/dcx-react-library.css';

Design System

The dcx-react-library supports opt-in styling customizable via CSS custom properties.

To keep the library UI/UX agnostic the styles are not shipped by default. In order to include them in your project you can import them as follows:

/* main.jsx */

import '@capgeminiuk/dcx-react-library/design-system/index.css';

Note that this will setup the styling for all the components in the library. You may want to fine-tune the imports if performance is critical for your application.

All the components have their own stylesheet and can be imported individually when needed:

/* Needed for core styles */
import '@capgeminiuk/dcx-react-library/design-system/base.css';

/* Individual imports, works well with tree-shaking */
import '@capgeminiuk/dcx-react-library/design-system/form-control.css';
import '@capgeminiuk/dcx-react-library/design-system/button.css';
// ...

Don't forget to add the base.css import before loading the individual stylesheets. It contains the core definitions used for the design system to work.

Contributing

If you'd like to contribute, please follow our CONTRIBUTING section.

Blog posts

Raise a bug or enhancement

If you find a bug or you would like to recommend an improvement, please raise an issue and use the appropriate template. We will be more than happy to improve the library, smashing all the bugs found and improve the functionality.

Contributors ✨ ✨

Thanks goes to these wonderful people

1.1.0-beta-7

5 months ago

1.1.0-beta-6

5 months ago

1.1.0-beta-1

5 months ago

1.1.0-beta-5

5 months ago

1.1.0-beta-4

5 months ago

1.1.0-beta-3

5 months ago

1.1.0-beta-2

5 months ago

1.0.0

6 months ago

1.1.0-ds-card

5 months ago

1.0.0-rc9

6 months ago

1.0.0-rc8

6 months ago

1.0.0-rc7

6 months ago

1.0.0-rc6

6 months ago

1.0.0-rc5

7 months ago

1.0.0-rc4

7 months ago

1.0.0-rc-4

7 months ago

1.0.0-rc-2

9 months ago

1.0.0-rc-3

7 months ago

1.0.0-rc-1

9 months ago

0.8.0-rc4

1 year ago

0.8.0-rc2

1 year ago

0.8.0-rc3

1 year ago

0.8.1

1 year ago

0.8.0

1 year ago

0.8.0-rc1

1 year ago

0.8.0-alpha-2

1 year ago

0.8.0-alpha-1

2 years ago

0.7.0-rc-1

2 years ago

0.7.0

2 years ago

0.7.0-rc-2

2 years ago

0.7.0-alpha-15

2 years ago

0.7.0-alpha-14

2 years ago

0.7.0-alpha-13

2 years ago

0.7.0-alpha-12

2 years ago

0.7.0-alpha-11

2 years ago

0.7.0-alpha-8

2 years ago

0.7.0-alpha-10

2 years ago

0.7.0-alpha-9

2 years ago

0.7.0-beta-1

2 years ago

0.7.0-alpha-4

2 years ago

0.7.0-alpha-3

2 years ago

0.7.0-alpha-6

2 years ago

0.7.0-alpha-5

2 years ago

0.7.0-alpha-7

2 years ago

0.6.0-rc-1

2 years ago

0.6.0-rc-2

2 years ago

0.7.0-alpha-2

2 years ago

0.7.0-alpha-1

2 years ago

0.6.0

2 years ago

0.6.0-alpha-1

2 years ago

0.6.0-alpha-2

2 years ago

0.6.0-alpha-3

2 years ago

0.6.0-alhpa-1

2 years ago

0.5.0-rc-1

2 years ago

0.5.0-rc-2

2 years ago

0.5.0

2 years ago

0.5.0-alpha-1

2 years ago

0.5.0-beta-5

2 years ago

0.5.0-beta-4

2 years ago

0.5.0-beta-3

2 years ago

0.5.0-beta-2

2 years ago

0.5.0-anjs-2

2 years ago

0.5.0-beta-1

2 years ago

0.5.0-anjs-1

2 years ago

0.5.0-anjs-4

2 years ago

0.5.0-anjs-3

2 years ago

0.5.0-anjs-6

2 years ago

0.5.0-anjs-5

2 years ago

0.5.0-anjs

2 years ago

0.4.0

2 years ago

0.4.0-beta-8

3 years ago

0.4.0-beta-3

3 years ago

0.4.0-beta-4

3 years ago

0.4.0-beta-5

3 years ago

0.4.0-beta-6

3 years ago

0.4.0-beta-7

3 years ago

0.4.0-beta-1

3 years ago

0.4.0-beta-2

3 years ago

0.3.4

3 years ago

0.3.3

3 years ago

0.3.1-alpha-4

3 years ago

0.3.1-alpha-5

3 years ago

0.3.1-alpha-6

3 years ago

0.3.1-alpha-7

3 years ago

0.3.1-alpha-8

3 years ago

0.3.1-alpha-9

3 years ago

0.3.1-alpha

3 years ago

0.3.2

3 years ago

0.3.1-alpha-1

3 years ago

0.3.1

3 years ago

0.3.1-alpha-2

3 years ago

0.3.1-alpha-3

3 years ago

0.3.0

3 years ago

0.2.4

3 years ago

0.2.3

3 years ago

0.2.2

3 years ago

0.2.1

3 years ago

0.2.0

3 years ago

0.2.0-beta-1

3 years ago

0.1.2

3 years ago

0.1.1

3 years ago

0.1.0

3 years ago