All Projects → nordcloud → GNUI

nordcloud / GNUI

Licence: MIT license
💅 Nordcloud's design system for SaaS products.

Programming Languages

typescript
32286 projects

Projects that are alternatives of or similar to GNUI

sodium-ui
Sodium is a simple, modular and customizable web component library to build elegant and accessible UI pieces for your React Application.
Stars: ✭ 23 (+9.52%)
Mutual labels:  storybook, component-library, ui-library
react-component-library-lerna
Build your own React component library managed with lerna, presented with storybook and published in private npm registry.
Stars: ✭ 55 (+161.9%)
Mutual labels:  storybook, component-library
Carbon Components Svelte
Svelte implementation of the Carbon Design System
Stars: ✭ 685 (+3161.9%)
Mutual labels:  component-library, ui-library
clockface
UI Kit for building Chronograf
Stars: ✭ 33 (+57.14%)
Mutual labels:  storybook, component-library
smores-react
🍭 Marshmallow React components
Stars: ✭ 34 (+61.9%)
Mutual labels:  storybook, component-library
mijin
Tailwind CSS UI components build for Vue.js / Nuxt.js
Stars: ✭ 168 (+700%)
Mutual labels:  component-library, ui-library
carbon-components-svelte
Svelte implementation of the Carbon Design System
Stars: ✭ 1,615 (+7590.48%)
Mutual labels:  component-library, ui-library
fyndiq-ui
Library of reusable web frontend components for Fyndiq
Stars: ✭ 39 (+85.71%)
Mutual labels:  storybook, component-library
react-library-template
Jumpstart your team's shared react library
Stars: ✭ 26 (+23.81%)
Mutual labels:  storybook, component-library
design-systems
A list of famous design systems, design languages and guidelines
Stars: ✭ 403 (+1819.05%)
Mutual labels:  component-library, ui-library
Govuk React
An implementation of the GOV.UK Design System in React using CSSinJS
Stars: ✭ 219 (+942.86%)
Mutual labels:  storybook, component-library
lerna-starter
Simple React UI Development environment boilerplate to develop, test and publish your React components.
Stars: ✭ 55 (+161.9%)
Mutual labels:  storybook, component-library
react-uswds
USWDS 3.0 components built in React
Stars: ✭ 108 (+414.29%)
Mutual labels:  storybook, component-library
kahi-ui
Straight-forward Svelte UI for the Web
Stars: ✭ 169 (+704.76%)
Mutual labels:  component-library, ui-library
vue-authoring-template
Vue project template for authoring component and their use case
Stars: ✭ 14 (-33.33%)
Mutual labels:  storybook
design-system
A Storybook project for UI development of React components for the MetaBrainz projects
Stars: ✭ 19 (-9.52%)
Mutual labels:  storybook
storybook-graphql-kit
Write GraphQL queries and pass response data to your components
Stars: ✭ 19 (-9.52%)
Mutual labels:  storybook
storybook-addon-blabbr
Component reviewer for React Storybook
Stars: ✭ 13 (-38.1%)
Mutual labels:  storybook
components
Reusable React components used by HospitalRun
Stars: ✭ 109 (+419.05%)
Mutual labels:  storybook
babel-plugin-storybook-csf-title
A Babel plugin to generate titles for Storybook CSF stories at compile time, typically based on the story file's file name.
Stars: ✭ 17 (-19.05%)
Mutual labels:  storybook

PRs Welcome

All Contributors

General Nordcloud UI

This repo contains the Nordcloud Design System - a collection of reusable React components used in Nordcloud's SaaS products.

Components

  1. Design System (/src/components)
  2. Storybook (/src/stories)

Install

npm install @nordcloud/gnui

or

yarn add @nordcloud/gnui

Make sure you have a proper versions of required packages installed, they are specified in peerDependencies field inside package.json.

Version 7 or greater of npm should install them automatically, if not, run:

npm install react react-dom styled-components

Don't forget to install types if you are using TypeScript:

npm install -D @types/react @types/react-dom @types/styled-components

Usage

Apply global GNUI styles at the top level of your app:

import { SetGlobalStyle } from "@nordcloud/gnui";

ReactDOM.render(
  <React.StrictMode>
    <SetGlobalStyle customScrollbars />
    <App />
  </React.StrictMode>,
  document.getElementById("root")
);

Switch themes:

import {
  Button,
  SVGIcon,
  useThemeSwitcher,
  THEME_OPTIONS,
} from "@nordcloud/gnui";

function UserSettings() {
  const { currentTheme, setTheme } = useThemeSwitcher();

  return (
    <Button onClick={() => setTheme(nextTheme)}>
      <IconWrap>
        <SVGIcon name="dashboard" />
      </IconWrap>
      Switch to {THEME_OPTIONS[nextTheme].toLowerCase()} theme
    </Button>
  );
}

Storybook deployment

Storybook allows you to preview components. It deploys the code automatically with Amplify Console triggered by changes on branch master. Pipeline steps are found in amplify.yml.

When you create a PR against the master branch, Amplify creates a new deployment automatically - the environment will be attached to the PR at Github. Reviewers can preview changes using this deployment - after the PR gets merged or rejected, the environment is destroyed automatically by Amplify Console.

Contributing to this repo

  • Please create your components in src/components and update stories in stores.
  • Code should be formatted using Prettier.
  • We are using styled-components for styling.
  • All code should be written using TS.
  • Every component props should be described using "type" instead of "interface".
  • Name types with Pascal Case naming convention and Props or Data prefix.

Local setup

1. Clone the repo

2. Setup Node

Below versions of Node & npm are required:

  "node": ">=16.13.0",
  "npm": ">=8.0.0"

3. Install packages

npm install

4. Run Storybook to verify everything works

npm run storybook

Development

Local testing

There is a possibility to build & test the package locally in the project it's currently used in.

npm run build
npm pack

You will get a tarball with the freshly built package, you can copy it inside your project's folder and install with

npm install nordcloud-gnui-${VERSION}.tgz

After the successful installation it's ready to be tested (remember to restart the dev server)

Contributors


raczyk

Dominik N

Jan Osio

Horay

This project follows the all-contributors specification. Contributions of any kind are welcome!

License

Licensed under the MIT License, Copyright © 2020 Nordcloud Engineering

See LICENSE for more information.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].