openfun / cunningham

🎨 The Open FUN Design System
https://openfun.github.io/cunningham/
MIT License
23 stars 2 forks source link
accessibility atomic-design components-library css design-system design-systems figma frontend html reactjs storybook ui-components
# Cunningham **A design system and a components library.** πŸ“š  Documentation β€’ πŸ–ŒοΈ  Figma β€’ πŸ•ΉοΈ  Demo
[![CircleCI](https://circleci.com/gh/openfun/cunningham/tree/main.svg?style=svg)](https://circleci.com/gh/openfun/cunningham/tree/main) [![Discord](https://img.shields.io/discord/1082704478463082496?style=flat&logo=discord&label=discord&labelColor=5b61f1&logoColor=white&color=313338)](https://discord.gg/TXPSCMeDzd)

πŸ”Ž Preview

Here are some examples of real life usage of Cunningham components.

See the [documentation](https://openfun.github.io/cunningham/storybook) πŸ“š to learn more about customization, typography, spacings and available components!

⚑️ Getting started

➑️ First, install the library

yarn add @openfun/cunningham-react

➑️ Then, add this script to your package.json file

{
  "scripts": {
    "build-theme": "cunningham -g css -o src"
  }
}

➑️ Then, in order to generate the css file, run

yarn build-theme

It will generate a file named cunningham-tokens.css.

➑️ Then, add these lines at the top of your main stylesheet file:

@import "@openfun/cunningham-react/fonts"; // Imports default fonts ( Roboto ). You can also import fonts by yourself.
@import "@openfun/cunningham-react/icons"; // Imports icons ( Material Icons ).
@import "@openfun/cunningham-react/style"; // Imports the default theme.
@import "cunningham-tokens"; // Imports the file you just generated.

Please take a look at customization documentation for more informations about the cunningham command line tool and to customize your local theme.

We're done! πŸŽ‰

To ensure everything works well, let's test rendering a component, such as the Button for example.

Now please see the documentation πŸ“š to learn more about customization, typography, spacings and available components!

Contributors

Contributing

This project is intended to be community-driven, so please, do not hesitate to get in touch if you have any question related to our implementation or design decisions.

Please see our contributing guidelines.

License

This work is released under the MIT License (see LICENSE).