Getting Started
Foundations
Components
Search for a command to run...
How to install and configure the Strongtie Design System in your project.
Get started with the Strongtie Design System by installing the React component library in your application.
Starting a new app? Review our Framework Recommendations before getting started
Before you begin, ensure you have:
The Strongtie Design System is flexible and works with or without CSS frameworks. Choose the approach that fits your project:
If you're using Tailwind or another CSS framework:
If you're NOT using a CSS framework:
Need design tokens in CSS?
Import from Styles package: @strongtie/styles/tokens.css
Access via CSS custom properties: var(--color-primary-500)
Before installing the design system, you need to authenticate with GitHub Package Manager since @strongtie/design-system is hosted as a private enterprise package.
read:packages - Required for installing packages⚠️
Create or update your .npmrc file in your project root or home directory:
# Project-level .npmrc (recommended)
echo "@strongtie:registry=https://npm.pkg.github.com" >> .npmrc
# Or home directory .npmrc for global access
echo "@strongtie:registry=https://npm.pkg.github.com" >> ~/.npmrcnpm login --scope=@strongtie --registry=https://npm.pkg.github.comWhen prompted:
Alternative: Using .npmrc file directly
# Add to your .npmrc
//npm.pkg.github.com/:_authToken=YOUR_GITHUB_TOKENSecurity Note: If you must commit your .npmrc file to version control, ensure your GitHub token has only read:packages privileges. For CI/CD pipelines, prefer using environment variables with read-only tokens.
Install the @strongtie/design-system package from GitHub Package Manager:
Note: sonner is a peer dependency required for toast notifications. If
you don't plan to use toasts, you can skip installing it.
In your application's entry point (typically App.tsx, main.tsx, index.tsx, or main .css file), import the CSS:
import "@strongtie/design-system/styles"
function App() {
return <div>Your app content</div>
}
export default Apphtml,
* {
font-family: var(--font-family);
}Import and use components from the library:
import "@strongtie/design-system/styles"
import { Button } from "@strongtie/design-system/button"
import {
Card,
CardContent,
CardHeader,
CardTitle,
} from "@strongtie/design-system/card"
function App() {
return (
<Card>
<CardHeader>
<CardTitle>Welcome to Strongtie Design System</CardTitle>
</CardHeader>
<CardContent>
<Button onClick={() => console.log("Clicked!")}>Get Started</Button>
</CardContent>
</Card>
)
}
export default AppFor Next.js projects using the App Router, import styles in your root layout:
import "@strongtie/design-system/styles"
import type { Metadata } from "next"
export const metadata: Metadata = {
title: "My App",
description: "Built with Strongtie Design System",
}
export default function RootLayout({
children,
}: {
children: React.ReactNode
}) {
return (
<html lang="en">
<body>{children}</body>
</html>
)
}If you only need the CSS styles without React components, you have two options: use our CDN or install the @strongtie/styles package. This is useful for non-React projects or when you want to build custom components.
Add the stylesheet link to your HTML <head>:
<!-- All styles combined -->
<link rel="stylesheet" href="https://cdn.strongtie.io/styles/latest/all.css" />
<!-- Or load individual modules -->
<link rel="stylesheet" href="https://cdn.strongtie.io/styles/latest/tokens.css" />
<link rel="stylesheet" href="https://cdn.strongtie.io/styles/latest/fonts.css" />
<link rel="stylesheet" href="https://cdn.strongtie.io/styles/latest/components.css" />
<link rel="stylesheet" href="https://cdn.strongtie.io/styles/latest/reset.css" />Version Pinning: Replace latest with a specific version number (e.g., v2.5.4) for production environments to prevent unexpected changes.
Install the styles package:
@import "@strongtie/styles";For smaller bundle sizes, import only what you need:
/* Design tokens only (~3-5 KB) */
@import "@strongtie/styles/tokens";
/* Specific components */
@import "@strongtie/styles/reset";
@import "@strongtie/styles/fonts";
@import "@strongtie/styles/components";| Module | Import | Size | Description |
|---|---|---|---|
| All | @strongtie/styles/all | ~50-80 KB | Complete design system |
| Reset | @strongtie/styles/reset | ~5-8 KB | CSS normalize |
| Fonts | @strongtie/styles/fonts | ~2-4 KB | Font faces |
| Tokens | @strongtie/styles/tokens | ~3-5 KB | Design tokens only |
| Components | @strongtie/styles/components | ~25-35 KB | All component styles |
Use CDN when:
latest)Use NPM when:
Create a simple test component to verify everything is working:
import { Button } from "@strongtie/design-system/button"
export function TestButton() {
return (
<Button variant="primary" size="medium">
Design System is Working! ✓
</Button>
)
}If styles aren't applying correctly:
@strongtie/design-system/styles in your entry fileIf you encounter TypeScript errors:
moduleResolution is set to "bundler" or "node16"If you see "Module not found" errors:
node_modules and your lock filenpm install (or equivalent) againIf you get 401 Unauthorized errors when installing:
read:packages scope.npmrc is configured correctlynpm login --scope=@strongtie --registry=https://npm.pkg.github.comIf npm can't find @strongtie/design-system:
Verify the registry is set correctly:
npm config get @strongtie:registryShould return: https://npm.pkg.github.com
Ensure you have access to the repository
Check that you've authenticated with your token
Now that you have the Strongtie Design System installed, you can: