@govtech-bb/design
v1.0.0-alpha.8
Published
Design tokens and Tailwind CSS utilities for GovTechBB Design System
Readme
@govtechbb/design
Design tokens and Tailwind CSS utilities for the GovTechBB Design System.
Installation
npm install @govtech-bb/designUsage
Import the design tokens in your Tailwind CSS file:
@import 'tailwindcss';
/* Import the design tokens */
@import '@govtech-bb/design';
/* You need to add the path to the react components */
@source "../../node_modules/@govtech-bb/react/dist/**/*.js";Design Tokens
Colors
Color Palette
Each color has four shades (dark, 100, 40, 10):
Blue:
blue-dark- #00164Ablue-100- #00267F (Primary)blue-40- #99A8CCblue-10- #E5E9F2
Yellow:
yellow-dark- #E8A833yellow-100- #FFC726yellow-40- #FFE9A8yellow-10- #FFF9E9
Green:
green-dark- #00654Agreen-100- #1FBF84green-40- #A5E5CEgreen-10- #E9F9F3
Red:
red-dark- #A42C2Cred-100- #FF6B6Bred-40- #FFC4C4red-10- #FFF0F0
Purple:
purple-dark- #4A235Apurple-100- #A962C7purple-40- #DDC0E9purple-10- #F6EFF9
Pink:
pink-dark- #AD1157pink-100- #FF94D9pink-40- #FFD4F0pink-10- #FFF4FB
Teal:
teal-dark- #0E5F64teal-100- #30C0C8teal-40- #ACE6E9teal-10- #EAF9F9
Neutral Colors
Neutral:
neutral-black- #000000neutral-midgrey- #595959neutral-grey- #E0E4E9neutral-white- #FFFFFF
Deprecated Colors
Deprecated Yellow:
deprecated-yellow-dark- #E8A833deprecated-yellow-bright- #FFC726deprecated-yellow-light- #FFEAA7
Deprecated Blue:
deprecated-blue-dark- #00267Fdeprecated-blue-bright- #409CF8deprecated-blue-light- #B3D9FF
Deprecated Red:
deprecated-red-bright- #FF6B6Bdeprecated-red-light- #FFD6D6
Deprecated Pink:
deprecated-pink-bright- #FF94D9deprecated-pink-light- #FFD4F0
Deprecated Purple:
deprecated-purple-bright- #A962C7deprecated-purple-light- #E1BEE7
Deprecated Teal:
deprecated-teal-bright- #30C0C8deprecated-teal-light- #DEF5F6
Deprecated Green:
deprecated-green-bright- #1FBF84deprecated-green-light- #A8E6CF
Other Deprecated:
brand-teal-darker- #0A4549brand-teal-hover- #083A3Dbrand-teal-light- #1A777Dbrand-neutral-gray-light- #E0E4E9brand-neutral-gray- #D7DCE2brand-neutral-gray-dark- #B9C0C6
Example:
<div className="bg-blue-100 text-neutral-white">Hello World</div>Typography
Typography Utilities
Use these utility classes for consistent typography:
<h1 className="text-display">Display Text</h1>
<h1 className="text-h1">Heading 1</h1>
<h2 className="text-h2">Heading 2</h2>
<h3 className="text-h3">Heading 3</h3>
<h4 className="text-h4">Heading 4</h4>
<p className="text-body-lg">Large Body Text</p>
<p className="text-body">Body Text</p>Typography Tokens
Or use the tokens directly:
Font Sizes:
font-size-display- 5rem (80px)font-size-h1- 3.5rem (56px)font-size-h2- 2.5rem (40px)font-size-h3- 1.5rem (24px)font-size-h4- 1.25rem (20px)font-size-body-lg- 2rem (32px)font-size-body- 1.25rem (20px)
Line Heights:
line-height-display- 1line-height-h1- 1.15line-height-h2- 1.25line-height-h3- 1.25line-height-h4- 1.4line-height-body-lg- 1.5line-height-body- 1.7
Font Weights:
font-weight-bold- 700font-weight-normal- 400
Shadows
form-hover- Inset shadow for form element hover states
Disabled State
Token:
opacity-disabled- 0.4 (40% opacity for disabled elements)
Utility:
<button className="disabled-state" disabled>
Disabled Button
</button>The disabled-state utility automatically applies:
cursor: not-allowedopacity: 0.4
All form components use this consistent disabled styling.
Modifying Design Tokens
To add or modify design tokens, edit packages/design/src/index.css:
- Add tokens in the
@themeblock for colors, spacing, shadows, etc. - Add custom utilities using
@utilityfor reusable component patterns
