React components, built with Tailwind CSS, Shadcn, and VisX
Resources
- Github repo
- Distribution
- Building blocks
- Documentation via Storybook
- Github Pages - docs only
- Development
- Other documentation, documents
Canopy provides foundational styles (colors, theme, typography, dimensions) as importable CSS. Import the styles in your primary .css file:
@import "tailwindcss";
@import "@still-forest/canopy/styles";
@source "../node_modules/@still-forest/canopy/dist";
@layer base {
/* your usual CSS definitions */
}The @import provides Canopy's design tokens, theme variables, and utility classes. The @source directive ensures Tailwind detects classes used by Canopy components (docs).
You can also import individual style modules:
@import "@still-forest/canopy/styles/theme.css";
@import "@still-forest/canopy/styles/typography.css";Override any Canopy design tokens by redefining CSS variables after the import:
@import "@still-forest/canopy/styles";
:root {
--font-brand: "My Custom Font", serif;
--color-brand: #4a90d9;
}Overlay components use a tiered z-index system to ensure correct stacking when nested:
| z-index | Layer | Components |
|---|---|---|
50 |
Panels | Sheet |
55 |
Modals | Dialog |
60 |
Floating | Popover, DropdownMenu |
- In this package, run build in watch mode:
pnpm build:watchThen expose it locally for linking:
pnpm link- In the consuming package, link package.json to the locally built version:
pnpm link @still-forest/canopy- When done, cleanup:
pnpm unlink @still-forest/canopy
pnpm store prune # clear pnpm's global store- In this package, run build in watch mode:
pnpm build:watch- In the consuming package, point package.json to the locally built version:
pnpm add ~/Development/canopyAlternatively, directly copy the built version periodically:
rm -rf ./node_modules/@still-forest/canopy/dist && cp -r ~/Development/canopy/dist ./node_modules/@still-forest/canopy/dist