1.18.1 • Published 7 months ago

@kroo-web/design-system v1.18.1

Weekly downloads
-
License
ISC
Repository
-
Last release
7 months ago

Kroo Design System

Usage

First, install the package with whatever flavour of package manager that you would like.

Install

  npm install @kroo-web/design-system -S

or

  yarn add @kroo-web/design-system -S

or

  pnpm add @kroo-web/design-system -S

Tokens

Next, add the following the highest up in your application, usually in the App.js or index.js file.

This adds the tokens used in the design system to the root of the application. (the css modules come prebundled in the build this step is only for the tokens and odd global styles included in the design system).

import '@kroo-web/design-system/dist/styles/styles/global.css' <-- this is the tokens

import '@kroo-web/design-system/dist/styles/styles/style.css' <-- this is the css modules

That's all folks! You can now use the components in the design system in your application.

import { TextField } from "@kroo-web/design-system";

react-toastify

Our toasts have been styled via the design system however how the toast is displayed is handled by the react-toastify library. This means that you can use the toast function from react-toastify to display the toast in the project of your choosing and pass the Design System toast component to display it.

for setup you will need to add the ToastContainer component from react-toastify to the root of your project.

Testing without deploying the package

If you would like to test the design system without deploying the package, you can use npm pack to create a local tarball of the package:

# In the design system repo
npm run build  # Make sure to build the package first
npm pack       # This creates a .tgz file

Then in your project where you want to use the design system, you can install the local package:

# In your project directory
npm install /path/to/design-system/kroo-web-design-system-1.0.0.tgz

The exact filename will depend on your package version. This method will properly update your package.json and is more reliable than using npm link.

To update the package after making changes: 1. Make your changes in the design system 2. Run npm run build 3. Run npm pack again 4. Reinstall the new .tgz file in your project

Next Steps

Here are the key areas for improving and evolving the design system:

1. Token Management

  • Create a separate @kroo-web/tokens package to manage design tokens independently
  • Implement Token Studio integration with Figma for real-time token management
  • Set up a CI/CD pipeline for automatic token updates from Figma to code
  • Add support for theme switching (light/dark mode) using token sets
  • Document token usage and naming conventions

2. Documentation Improvements

  • Set up a documentation site using tools like Docusaurus or Storybook Docs
  • Create comprehensive usage guidelines for each component
  • Add accessibility documentation and WCAG compliance status
  • Include interactive examples and code playgrounds
  • Document component composition patterns and best practices
  • Add visual regression testing documentation

3. Component Architecture

  • Implement a more robust component composition system
  • Add support for component variants using a consistent API
  • Create higher-order components for common patterns
  • Improve type definitions and prop documentation
  • Add performance benchmarks for components

4. Testing and Quality

  • Implement end-to-end testing using Cypress or Playwright
  • Add visual regression testing with tools like Percy or Chromatic
  • Improve unit test coverage
  • Add accessibility testing using tools like axe-core
  • Set up automated performance monitoring

5. Developer Experience

  • Add better error messages and development-time warnings
  • Create codemods for breaking changes

6. Design-Development Workflow

  • Set up automated design token sync from Figma
  • Implement a component request and review process
  • Create a changelog automation system
  • Add design system analytics to track component usage
  • Establish a regular design system review process

7. Performance Optimization

  • Add bundle size monitoring
  • Optimize asset loading and delivery

Automated Changelog

We use Conventional Commits and Release-Please to automate our changelog generation.

Deployments of storybook

This app uses Terraform to manage the Amplify instance in AWS

To make a change, amend the /infra/service/amplify.tf file and then run the below:

  npm run terraform:plan
  npm run terraform:apply

Gotchas

You need to set the github token in the main.tf file

Deployments

Documentation on how the deployments work can be found here.

1.14.1

8 months ago

1.2.0

12 months ago

1.14.0

8 months ago

1.18.1

7 months ago

1.18.0

7 months ago

1.14.2

8 months ago

1.2.6

10 months ago

1.2.5

12 months ago

1.6.0

10 months ago

1.2.4

12 months ago

1.2.3

12 months ago

1.2.2

12 months ago

1.2.1

12 months ago

1.1.107

12 months ago

1.15.0

8 months ago

1.1.0

12 months ago

1.9.1

10 months ago

1.9.0

10 months ago

1.5.0

10 months ago

1.10.1

8 months ago

1.10.0

8 months ago

1.12.2

8 months ago

1.12.1

8 months ago

1.12.0

8 months ago

1.16.0

8 months ago

1.8.0

10 months ago

1.4.0

10 months ago

1.9.2

8 months ago

1.11.0

8 months ago

1.13.2

8 months ago

1.13.0

8 months ago

1.17.1

8 months ago

1.13.4

8 months ago

1.7.0

10 months ago

1.3.0

10 months ago

1.1.106

1 year ago

1.1.104

1 year ago

1.1.103

1 year ago

1.1.100

1 year ago

1.1.102

1 year ago

1.1.101

1 year ago

1.1.99

1 year ago

1.1.98

1 year ago

1.1.97

1 year ago

1.1.92

1 year ago

1.1.91

1 year ago

1.1.90

1 year ago

1.1.96

1 year ago

1.1.95

1 year ago

1.1.94

1 year ago

1.1.93

1 year ago

1.1.89

1 year ago

1.1.88

1 year ago

1.1.87

1 year ago

1.1.86

1 year ago

1.1.85

1 year ago

1.1.70

1 year ago

1.1.74

1 year ago

1.0.62

1 year ago

1.1.73

1 year ago

1.0.61

1 year ago

1.1.72

1 year ago

1.0.60

1 year ago

1.1.71

1 year ago

1.1.78

1 year ago

1.0.66

1 year ago

1.1.77

1 year ago

1.1.76

1 year ago

1.0.64

1 year ago

1.1.75

1 year ago

1.0.63

1 year ago

1.1.79

1 year ago

1.0.67

1 year ago

1.1.81

1 year ago

1.1.80

1 year ago

1.1.84

1 year ago

1.1.83

1 year ago

1.1.82

1 year ago

1.1.67

1 year ago

1.0.59

1 year ago

1.0.58

1 year ago

1.1.69

1 year ago

1.0.57

1 year ago

1.1.68

1 year ago

1.0.56

1 year ago

1.0.55

2 years ago

1.0.54

2 years ago

1.0.53

2 years ago

1.0.52

2 years ago

1.0.51

2 years ago

1.0.49

2 years ago

1.0.50

2 years ago

1.0.48

2 years ago

1.0.47

2 years ago

1.0.46

2 years ago

1.0.45

2 years ago

1.0.44

2 years ago

1.0.43

2 years ago

1.0.42

2 years ago

1.0.41

2 years ago

1.0.39

2 years ago

1.0.40

2 years ago

1.0.38

2 years ago

1.0.29

2 years ago

1.0.33

2 years ago

1.0.32

2 years ago

1.0.31

2 years ago

1.0.30

2 years ago

1.0.37

2 years ago

1.0.36

2 years ago

1.0.35

2 years ago

1.0.34

2 years ago

1.0.28

2 years ago

1.0.27

2 years ago

1.0.26

2 years ago

1.0.22

2 years ago

1.0.25

2 years ago

1.0.24

2 years ago

1.0.23

2 years ago

1.0.19

2 years ago

1.0.21

2 years ago

1.0.20

2 years ago

1.0.18

2 years ago

1.0.17

2 years ago

1.0.16

2 years ago

1.0.15

2 years ago

1.0.14

2 years ago

1.0.13

2 years ago

1.0.12

2 years ago

1.0.11

2 years ago

1.0.10

2 years ago

1.0.9

2 years ago

1.0.8

2 years ago

1.0.7

2 years ago

1.0.6

2 years ago

1.0.5

2 years ago

1.0.4

2 years ago

1.0.3

2 years ago

1.0.2

2 years ago

1.0.1

2 years ago

1.0.0

2 years ago