Skip to content
Themeable design system for the SEEK Group
TypeScript JavaScript
Branch: master
Clone or download
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
.github chore(github): Add code owners configuration (#104) Feb 22, 2019
@types chore(deps): Upgrade basekick to deprecate internal module type (#187) May 21, 2019
docs docs: Add design and development workflow guides (#383) Nov 7, 2019
generate-component-docs feat(Loader): Add initial component (#403) Nov 14, 2019
icons feat(Icon): Add more components to suite (#391) Nov 8, 2019
lib feat(Loader): Add initial component (#403) Nov 14, 2019
reset fix: Re-introduce BraidLoadableProvider (#320) Sep 11, 2019
scripts docs: Restructure site to better handle icons (#390) Nov 8, 2019
site/src docs: Add search to Iconography page (#404) Nov 14, 2019
themes feat(themes): Add 'seekBusiness' theme (#352) Oct 17, 2019
.editorconfig Initial commit Sep 10, 2018
.eslintignore build: Automatically generate icons from SVGs (#294) Aug 26, 2019
.gitignore build: Automatically generate icons from SVGs (#294) Aug 26, 2019
.npmignore Rename ‘src’ folder to ‘lib’ Sep 26, 2018
.npmrc Initial commit Sep 10, 2018
.nvmrc chore: Setup notion toolchain (#114) Feb 28, 2019
.prettierignore build: Automatically generate icons from SVGs (#294) Aug 26, 2019
.travis.yml feat: Add Autosuggest component (#316) Sep 6, 2019
LICENSE Initial commit Sep 10, 2018
README.md fix: Re-introduce BraidLoadableProvider (#320) Sep 11, 2019
logo.png fix: Add initial wireframe theme, hoist propTypes in themed components ( Oct 17, 2018
package.json docs: Add search to Iconography page (#404) Nov 14, 2019
release.config.js feat: Release v1 (#250) Jun 28, 2019
renovate.json ci(renovate): Add playroom (#38) Nov 16, 2018
sku.config.js feat(themes): Add 'seekBusiness' theme (#352) Oct 17, 2019
sku.routes.js docs: Add initial tone documentation, tweak icon layout (#396) Nov 11, 2019
yarn.lock chore(deps): Update dependency sku to v8.14.6 (#398) Nov 11, 2019

README.md

BRAID

Themeable design system for the SEEK Group.

Build Status npm semantic-release Commitizen friendly


Setup

This guide is currently optimised for usage with sku, since it's configured to support Braid out of the box. If your project has a custom build setup, you'll need some extra guidance from project contributors to configure your bundler.

In your sku project, first install this library:

$ npm install --save braid-design-system

At the very top of your application, import the reset, required theme and the BraidProvider component.

WARNING: The reset styles must be imported first to avoid CSS ordering issues.

For example:

import 'braid-design-system/reset'; // <-- Must be first
import jobStreetTheme from 'braid-design-system/themes/jobStreet';
import { BraidProvider, Text } from 'braid-design-system';
// ...etc.

Finally, render the BraidProvider component, providing the imported theme via the theme prop:

import 'braid-design-system/reset';
import jobStreetTheme from 'braid-design-system/themes/jobStreet';
import { BraidProvider, Text } from 'braid-design-system';

export default () => (
  <BraidProvider theme={jobStreetTheme}>
    <Text>Hello World!</Text>
  </BraidProvider>
);

If you're rendering within the context of another application, you may want to opt out of the provided body styles, which set the background color and reset margin and padding:

<BraidProvider theme={jobStreetTheme} styleBody={false}>
  <Text>Hello World!</Text>
</BraidProvider>

Multi-theme setup

If you require multiple themes and want to code split them, you can subsitute the BraidProvider with the BraidLoadableProvider, passing it the necessary themeName at runtime. Remove any explicit theme imports you may have.

import 'braid-design-system/reset';
import { BraidLoadableProvider, Text } from 'braid-design-system';

export default ({ themeName }) => (
  <BraidLoadableProvider themeName={themeName}>
    <Text>Hello World!</Text>
  </BraidLoadableProvider>
);

Style Guide Migration

If you're migrating from an existing style guide, please refer to the Style Guide Migration guide.

Local Development

This project uses Yarn for development dependencies.

Installing with yarn is required to ensure dependencies match the current yarn.lock.

$ yarn
$ yarn start

Start a local Storybook server:

$ yarn storybook

Thanks

Chromatic for providing component screenshot testing, powered by Storybook.

License

MIT.

You can’t perform that action at this time.