apps/shade/src/docs/introduction.mdx
import { Meta } from '@storybook/addon-docs/blocks';
<Meta title="Introduction" /> <div className="sb-doc">Shade is built on three powerful foundations:
Shade contains reusable, system-wide components and patterns. Keep one-off, app-specific components in the consuming application rather than adding them to Shade.
Shade components are used across:
# Install Shade
yarn add @tryghost/shade
# Install peer dependencies
yarn add react react-dom tailwindcss
Note: The package is currently private and primarily consumed internally in the monorepo. The snippet above reflects usage once published.
import {Button} from '@tryghost/shade/components';
function MyComponent() {
return (
<Button variant="solid">
Continue
</Button>
);
}
Import Shade's styles in your app entry CSS:
@import "@tryghost/shade/styles.css";
For Tailwind v4 utility generation, scan both your app files and Shade component usage paths with @source.
Shade scopes all styles to a .shade container and toggles dark mode with a .dark class inside that scope.
Use ShadeApp to handle scoping and provide context:
import {ShadeApp} from '@tryghost/shade/app';
import {Button} from '@tryghost/shade/components';
export default function App() {
// Toggle dark mode by switching the `darkMode` prop
return (
<ShadeApp darkMode={false}>
<div>
<Button>Continue</Button>
</div>
</ShadeApp>
);
}
Alternatively, wrap your UI in a div with className="shade" and toggle a nested .dark class when needed.
Our documentation is organized into: