All Projects → seek-oss → Braid Design System

seek-oss / Braid Design System

Licence: mit
Themeable design system for the SEEK Group

Programming Languages

typescript
32286 projects

Projects that are alternatives of or similar to Braid Design System

Seek Style Guide
Living style guide for SEEK, powered by React, webpack, CSS Modules and Less.
Stars: ✭ 302 (-65.99%)
Mutual labels:  webpack, babel, style-guide, front-end, css-modules
Sku
Front-end development toolkit
Stars: ✭ 403 (-54.62%)
Mutual labels:  webpack, babel, front-end, css-modules
Front End Guide
📚 Study guide and introduction to the modern front end stack.
Stars: ✭ 14,073 (+1484.8%)
Mutual labels:  webpack, babel, front-end, css-modules
React Pages Boilerplate
Deliver react + react-router application to gh-pages
Stars: ✭ 134 (-84.91%)
Mutual labels:  webpack, babel, css-modules
React Boilerplate
Production-ready boilerplate for building universal web apps with React and Redux
Stars: ✭ 53 (-94.03%)
Mutual labels:  webpack, babel, css-modules
Universal React Redux
🧐 A sensible universal starter kit for React + Redux
Stars: ✭ 112 (-87.39%)
Mutual labels:  webpack, babel, css-modules
React Redux Universal Boilerplate
An Universal ReactJS/Redux Boilerplate
Stars: ✭ 165 (-81.42%)
Mutual labels:  webpack, babel, css-modules
Breko Hub
Babel React Koa Hot Universal Boilerplate
Stars: ✭ 145 (-83.67%)
Mutual labels:  webpack, babel, css-modules
React Ssr Setup
React Starter Project with Webpack 4, Babel 7, TypeScript, CSS Modules, Server Side Rendering, i18n and some more niceties
Stars: ✭ 678 (-23.65%)
Mutual labels:  webpack, babel, css-modules
Typescript Webpack React Redux Boilerplate
React and Redux with TypeScript
Stars: ✭ 182 (-79.5%)
Mutual labels:  webpack, babel, css-modules
Css Modules Typescript Loader
Webpack loader to create TypeScript declarations for CSS Modules
Stars: ✭ 172 (-80.63%)
Mutual labels:  webpack, front-end, css-modules
React
Extremely simple boilerplate, easiest you can find, for React application including all the necessary tools: Flow | React 16 | redux | babel 6 | webpack 3 | css-modules | jest | enzyme | express + optional: sass/scss
Stars: ✭ 244 (-72.52%)
Mutual labels:  webpack, babel, css-modules
Serverless Plugin Typescript
Serverless plugin for zero-config Typescript support
Stars: ✭ 611 (-31.19%)
Mutual labels:  webpack, babel
Poi
⚡A zero-config bundler for JavaScript applications.
Stars: ✭ 5,291 (+495.83%)
Mutual labels:  webpack, babel
Nwb
A toolkit for React, Preact, Inferno & vanilla JS apps, React libraries and other npm modules for the web, with no configuration (until you need it)
Stars: ✭ 5,429 (+511.37%)
Mutual labels:  webpack, babel
Cordova Template Framework7 Vue Webpack
Framework7 - Vue - Webpack Cordova Template with Webpack Dev Server and Hot Module Replacement
Stars: ✭ 630 (-29.05%)
Mutual labels:  webpack, babel
Xiaoduyu.com
🐟小度鱼 - 年轻人的交流社区 https://www.xiaoduyu.com
Stars: ✭ 549 (-38.18%)
Mutual labels:  webpack, babel
React App
Create React App with server-side code support
Stars: ✭ 614 (-30.86%)
Mutual labels:  webpack, babel
React Webpack Typescript Starter
Minimal starter with hot module replacement (HMR) for rapid development.
Stars: ✭ 632 (-28.83%)
Mutual labels:  webpack, babel
Serverless Typescript Starter
🗄🙅‍♀️ Deploy your next serverless JavaScript function in seconds
Stars: ✭ 653 (-26.46%)
Mutual labels:  webpack, babel
BRAID

Themeable design system for the SEEK Group.

npm


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>

If you'd like to customise the technical implementation of all Link and TextLink components from Braid, you can pass a custom component to the linkComponent prop on BraidProvider. For example, if you wanted to ensure that all relative links are React Router links:

import React from 'react';
import { Link as ReactRouterLink } from 'react-router-dom';
import { BraidProvider, makeLinkComponent } from 'braid-design-system';
import wireframe from 'braid-design-system/themes/wireframe';

// First create the custom link implementation:
const CustomLink = makeLinkComponent(({ href, ...restProps }, ref) =>
  href[0] === '/' ? (
    <ReactRouterLink ref={ref} to={href} {...restProps} />
  ) : (
    <a ref={ref} href={href} {...restProps} />
  ),
);

// Then pass it to BraidProvider:
export const App = () => (
  <BraidProvider theme={wireframe} linkComponent={CustomLink}>
    ...
  </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

Contributing

Refer to CONTRIBUTING.md.

Thanks

Chromatic for providing component screenshot testing, powered by Storybook.

License

MIT.

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].