@manifesto-tech/tpximpact-design-system
v3.0.0
Published
Thoughtful, pattern-driven design system using [atomic design](https://atomicdesign.bradfrost.com/) principles; built with [Storybook](https://storybook.js.org) and [Vue3](https://v3.vuejs.org).
Downloads
74
Keywords
Readme
TPXimpact Design System
Thoughtful, pattern-driven design system using atomic design principles; built with Storybook and Vue3.
What's included?
This repository contains the components you need to start building user interfaces for the TPXimpact website and services.
Guidance
Visit the design system for an overview of the available components, and guidelines around how and when to use them.
Installing the TPXimpact design system
To install the design system and its' components into your project:
npm install @manifesto-tech/tpximpact-design-system
! This package will move account after in the future, changing the package name
Importing components
If you're using a transpiler or bundler such as Babel or Webpack, you can use the import syntax to import Vue components into your main Javascript file.
For example:
import TpxNavigationBar from "@manifesto-tech/tpximpact-design-system/components/organisms/navigation-bar/navigation-bar.vue";
Alternatively, if you do not wish to use Vue.js in your application then you can copy over the mark-up directly into your project. Where there is supporting JavaScript this can be initiated by importing the corresponding typescript file like so:
import TpxNavigationBarUtils from '@manifesto-tech/tpximpact-design-system/components/organisms/navigation-bar/navigation-bar.utils';
...
TpxNavigationBarUtils.init();
Importing styles
To reference our styles you will need a pipeline set up to compile Sass files into CSS.
You can import the parts of the design system that you need, for example, to include the styling for the headings atom you would import this as follows:
@use "node_modules/@manifesto-tech/tpximpact-design-system/components/atoms/type/heading.scss";
We would recommend that you also reference the base styles at least once in your project as this contains the relevant single classes and components that are used to support the majority of the stories within this package:
@use "node_modules/@manifesto-tech/tpximpact-design-system/styles/base";
Importing assets
This library comes with a few supporting images such as the logo and favicon, these can be copied from node_modules/@manifesto-tech/tpximpact-design-system/images/
if needed.
Local Development
If you have this repository checked out then you can get set-up and running by running the following:
Install packages and dependencies using:
npm install
To run the storybook and view the design system, run:
npm run storybook
Prerequisites
We found that older versions of npm and node have some difficulties installing and running the site, we would recommend using a pretty recent version of node. We have tested this across macOS and Windows using node 16.13.2 pretty reliably.
Windows
For Windows users, NVM is a pretty neat way to manage different versions of node if you're needing to keep an older version active for other projects: https://github.com/coreybutler/nvm-windows