0.2.17 • Published 8 days ago

@bronzelabs/tribe-ui v0.2.17

Weekly downloads
-
License
MIT
Repository
-
Last release
8 days ago

Tribe UI

The Tribe Project's design system for the web.

npm.io

Installation

# install with yarn
yarn add @bronzelabs/tribe-ui @bronzelabs/tribe-icons @bronzelabs/tribe-tailwind-preset

# or with npm
npm i @bronzelabs/tribe-ui @bronzelabs/tribe-icons @bronzelabs/tribe-tailwind-preset

Then install peer dependencies:

# with yarn
yarn add react react-dom next framer-motion

# with npm
npm i react react-dom next framer-motion

Setup

The Tribe Project uses tailwind as its styling solution. If you don't already have tailwind setup within your project head to the tailwindcss docs.

Begin by adding the tribe-tailwind-preset to your tailwind config:

import tribe from "@bronzelabs/tribe-tailwind-preset"

/** @type {import('tailwindcss').Config} */
module.exports = {
  content: [
    /* ... */
  ],
  presets: [tribe],
  plugins: [],
}

Caveat

Currently you'll need to add the design system source files to the content field of your tailwind.config.js so they are picked up by the compiler.

import tribe from "@bronzelabs/tribe-tailwind-preset"

/** @type {import('tailwindcss').Config} */
module.exports = {
  content: [
    /* ... */
    "node_modules/@bronzelabs/tribe-ui/dist/**/*.{js,jsx}", // <----
  ],
  presets: [tribe],
  plugins: [],
}

N.B. This behaviour is not ideal and we are looking for more stable ways round this.

Usage

To use a component from the design system, simply import and render it within you jsx:

import React from "react"
import { Button } from "@bronzelabs/tribe-ui"

const MyPage = () => {
  return (
    <div>
      <Button>Hello World</Button>
    </div>
  )
}

export default MyPage

For more in-depth explanations of how to use specific components, check out the storybook.

0.2.17

8 days ago

0.2.16

14 days ago

0.2.15

25 days ago

0.2.14

26 days ago

0.2.13

2 months ago

0.2.12

2 months ago

0.2.11

2 months ago

0.2.10

2 months ago

0.2.9

2 months ago

0.2.8

2 months ago

0.2.7

2 months ago

0.2.6

3 months ago

0.2.5

3 months ago

0.2.4

3 months ago

0.2.3

3 months ago

0.2.2

3 months ago

0.2.1

4 months ago

0.2.0

4 months ago

0.1.32

4 months ago

0.1.30

4 months ago

0.1.31

4 months ago

0.1.29

4 months ago

0.1.28

4 months ago

0.1.27

5 months ago

0.1.26

5 months ago

0.1.25

5 months ago

0.1.24

6 months ago

0.1.22

6 months ago

0.1.23

6 months ago

0.1.21

6 months ago

0.1.20

6 months ago

0.1.18

6 months ago

0.1.19

6 months ago

0.1.12

10 months ago

0.1.13

8 months ago

0.1.14

6 months ago

0.1.15

6 months ago

0.1.16

6 months ago

0.1.17

6 months ago

0.1.11

11 months ago

0.1.10

11 months ago

0.1.9

1 year ago

0.1.8

1 year ago

0.1.7

1 year ago

0.1.6

1 year ago

0.1.5

1 year ago

0.1.4

1 year ago

0.1.3

1 year ago

0.1.2

1 year ago

0.1.1

1 year ago

0.1.0

1 year ago