1.0.4 • Published 10 months ago

@kiwibot/foundation v1.0.4

Weekly downloads
-
License
MIT
Repository
-
Last release
10 months ago

Foundation

Foundation is the library where you will find definitions of colors, spaces, shadows, and animations of Kiwibot to work with your components regardless of whether it's React, Vue, Svelte, etc.

You will find a way to work directly with JS, CSS, SCSS, and even with TailwindCSS.

Installation

NPM:

npm install @kiwibot/foundation

YARN:

yarn add @kiwibot/foundation

JS

Colors

ColorTypeValue
lightmain#2c7be5
lighttext#12263f
lightbutton-text#FFFFFF
lightbody#F8FBFD
lightborder#edf2f9
lightcard#FFFFFF
lightsubtitle#95AAC9
lightpseudo-subtitle#95AAC9
lightdivider#E3EBF6
neutralgreen#9ACD32
neutraltransparent-green#9acd3220
neutralred#FF6347
neutraltransparent-red#FF63471a
neutralorange#FFC105
neutraltransparent-orange#FFC10520
darkmain#4070DE
darktext#FFFFFF
darkbutton-text#FFFFFF
darkbody#202327
darkborder#2D323A
darkcard#26292E
darksubtitle#616C7B
darkpseudo-subtitle#909EAF
darkdivider#373D46

Usage

import { tokens } from '@kiwibot/foundation';

console.log(tokens.color.light.main.value); // #2c7be5

Radius

TypeValue
small8px
large20px

Usage

import { tokens } from '@kiwibot/foundation';

console.log(tokens.radius.large.value); // 20px

Animations

TypeValue
defaultall 400ms cubic-bezier(0.420, 0.000, 0.580, 1.000)

Usage

import { tokens } from '@kiwibot/foundation';

console.log(tokens.animations.default.value); // all 400ms cubic-bezier(0.420, 0.000, 0.580, 1.000)

Shadows

TypeValue
level-10px 4px 6px rgba(33, 37, 41, 0.2)
level-20px 2px 10px rgba(33, 37, 41, 0.15)

Usage

import { tokens } from '@kiwibot/foundation';

console.log(tokens.shadows['level-1'].value); // 0px 4px 6px rgba(33, 37, 41, 0.2)

Spacings

TypeValue
44px
88px
1616px
3232px
4040px
4848px
5656px
6464px
8080px
100100px

Usage

import { tokens } from '@kiwibot/foundation';

console.log(tokens.spacings[16].value); // 16px

CSS & SCSS

To work with CSS or SCSS, you only need to import the files as follows:

JSX / TSX

// SAMPLE: CSS
import '@kiwibot/foundation/lib/tokens/css/colors.css';

// SAMPLE: SCSS
import '@kiwibot/foundation/lib/tokens/scss/colors.scss';

TailwindCSS

To work with TailwindCSS, you only need to add the following require in the tailwind.config.js file:

// tailwind.config.js

module.exports = {
  // ...
  // Add this line
  presets: [require('@kiwibot/foundation/lib/tailwindPreset.config.js')],
  // ...
};
1.0.2

10 months ago

1.0.4

10 months ago

1.0.3

10 months ago

1.0.1

1 year ago

1.0.0

1 year ago

0.0.4

1 year ago

0.0.3

1 year ago

0.0.2

1 year ago