Getting started
Introduction
Nimbus UI is the React library counterpart of Console Connect's design system.
Welcome
Nimbus UI is the React library counterpart of Console Connectβs design system - Nimbus. Nimbus UI consists of a core set of reusable components and composable components for common application design patterns. The system is split into /nimbus-core and /components to allow for primitive components and application specific components to be seperated and structured.
React is a core part of our front-end architecture and our components have to be able to handle large data sets and complex workflows. We take great care in designing components that are easy-to-use and flexible enough to handle unique configurations.
Table of contents
- ποΈ App structure
- π¦ Getting started
- π Releasing
- β¨ Contributing
- π Getting in touch
ποΈ App structure
Currently Nimbus is in the process of a redesign. This means that the structure of Nimbus UI might change, but for now our current structure supports two types of components (legacy & core). For this weβve had to break out components into two separate folders.
.nimbus-ui
βββ ...
βββ docs
βββ public
βββ src
β βββ components // all legacy components
β β βββ Input
β β βββ Button
β β βββ DropDown
β β βββ ...
β βββ nimbus-core // core components
β β βββ switch
β β βββ text-area
β β βββ text-input
β β βββ ...
β βββ nimbus-icons // nimbus icons
β βββ utils // hooks & utils
β βββ index.test.ts
β βββ index.ts // exports
β βββ setupTests.ts
β βββ typings.d.ts //global types
βββ ...
βββ package.lock.json
βββ package.json
βββ rollup.config.js
βββ tsconfig.jsonPlease note
- Components, Icons and their types are built with Rollup, meaning Nimbus supports tree shaking out of the box. For this reason we don't have separate packages.
- Nimbus UI compiles styles at build time - using its own version of cc-design-tokens. To use tokens, we still import the token package (which lives in a separate repository). For more information visit cc-design-tokens.
π¦ Getting started
Developing Nimbus
Local Install
You'll need Git and Node.js installed to get this project running.
Note: You will need the Node.js version specified in the .nvmrc file.
1. Clone repository
To run Nimbus UI locally, you will first need to clone the repository using git:
git clone git@github.com:ConsoleConnect/nimbus-ui.gitAfter that has finished cloning, you will need to cd nimbus-ui and check peer dependencies.
2. Using nvm (optional)
Nimbus relies on peer dependencies to be met before it can be installed. To meet these peer dependencies, youβll need to use node 18.
To enable switching version we use nvm (node version manager) to switch between versions easily.
- Install nvm
- Run
nvm --versionto check if itβs installed - Run
nvm installin the project directory (this will use .nvmrc) - (Optional) if your node version didnβt install try
nvm use 18or
3. Install dependencies
Peer dependencies
After youβve installed the node version we use, you can install.
npm installSometimes, npm might fail to install the peer dependencies. You can try running the install with the --legacy-peer-deps flag to bypass peerDependency auto-installation.
4. Start a local server
This will build storybook, serve it and watch for changes.
npm run storybookUsing Nimbus
Install
Nimbus is a private NPM module, to use Nimbus you'll need to get access to the console connect NPM account so youβre able to follow the getting started guide.
To use Nimbus UI components, all you need to do is install the @console/nimbus-ui package.
$ npm install @console/nimbus-ui --saveNimbus UI is best used with our Nimbus Tokens (cc-design-tokens) as these have a peer dependency on each other. This is also a private module hosted on the console connect org NPM account.
$ npm install @console/cc-design-tokens --saveNimbus UI relies on react, react-dom and react-router-dom as peer dependencies that need to be met.
"react": ">=16",
"react-dom": ">=16",
"react-router-dom": ">=5"Usage
Legacy, or composed components can be imported from the main entry:
import {} from '@console/nimbus-ui';Core components can be imported from the core subpath:
import React from 'react';
import { Switch } from '@console/nimbus-ui/core';
const App = () => {
return (
<div>
<Switch size="lg">Button</Switch>
<Switch size="lg">Button</Switch>
<Switch size="lg">Button</Switch>
<Switch size="lg">Button</Switch>
</div>
);
};
export default App;π Releasing
β¨ Contributing
See contributing.
π Getting in touch
Every PI we release a design system survey to gather data on how our design system is used and gather metrics from developers & designer alike.
For any general feedback or to raise an issue please feel free to get in touch with the design system team in #nimbus Slack channel and mention us via @team-nimbus. Once we have received your feedback it will be triaged and responded to.