Goblin System is a dark-first React design system built from scratch with a Material UI-inspired API. The workspace ships the typed theme engine, hundreds of styled-components primitives, Storybook playground, and a Docusaurus site driven by the same tokensβready to drop into any Vite or React build.
- Theme engine first β
createGoblinTheme(options)merges palettes, typography, shadows, breakpoints, and motions without leaking implementation details. - Material UI-style ergonomics β Components mirror familiar props (
variant,color,size,sx) while being implemented from scratch withstyled-components. - Typed surface area β Every package exports ES modules plus generated declaration files so tree-shaking and IDE tooling stay sharp.
- Shared runtime + docs tokens β Storybook, the Docusaurus docs, and your app all consume the same theme provider and
sxresolverβno drift. - Runtime kept lean β Only React 18+ and
styled-components@^6are required at runtime; all tooling stays in dev dependencies.
- Download the latest release archive from GitHub and install it locally (replace the version with the one you need):
VERSION=3.2.0
curl -L -o pkg-fe-react-goblin-system-$VERSION.tgz \
"https://github.com/5h1ngy/pkg-fe-react-goblin-system/releases/download/v$VERSION/pkg-fe-react-goblin-system-$VERSION.tgz"
npm install ./pkg-fe-react-goblin-system-$VERSION.tgz styled-componentsYou can also install straight from the release URL without downloading first:
npm install \
https://github.com/5h1ngy/pkg-fe-react-goblin-system/releases/download/v$VERSION/pkg-fe-react-goblin-system-$VERSION.tgz \
styled-componentsimport { ThemeProvider } from 'styled-components'
import {
GlobalStyle,
createGoblinTheme,
Section,
Card,
SurfaceButton,
ActionLink,
TagList,
TagPill,
} from 'pkg-fe-react-goblin-system'
const theme = createGoblinTheme({
palette: { mode: 'dark', secondary: { main: '#ffb422' } },
})
export function App() {
return (
<ThemeProvider theme={theme}>
<GlobalStyle />
<Section id="hero" accent="Featured Work">
<Card $variant="gradient" $interactive>
<p>Foggy gradients and pill buttons in one import.</p>
<TagList>
<TagPill>Motion</TagPill>
<TagPill>DX</TagPill>
</TagList>
<div style={{ display: 'flex', gap: '1rem', flexWrap: 'wrap' }}>
<SurfaceButton $tone="accent">Open case study</SurfaceButton>
<ActionLink href="#">See process β</ActionLink>
</div>
</Card>
</Section>
</ThemeProvider>
)
}| Area | Highlights | Location |
|---|---|---|
| Foundations | createGoblinTheme, GoblinThemeProvider, GlobalStyle, accent-aware color helpers |
packages/foundations |
| Components β Layout & Surfaces | Section, Grid, Card, Accordion, Paper, Modal, Popover |
packages/components/{layout,surfaces,utils} |
| Components β Data & Feedback | Typography, Badge, Chip, Snackbar, Collapse, ClickAwayListener |
packages/components/{data-display,feedback} |
| Navigation & Inputs | AppBar, Tabs, SpeedDial, Button, Select, TextField |
packages/components/{navigation,inputs} |
| System | sx resolver, spacing normalisation, style merging utilities |
packages/system |
All exports are available from the root, or from scoped paths when you need granular control:
pkg-fe-react-goblin-systemβ re-exports everything.pkg-fe-react-goblin-system/componentsβ component namespaces.pkg-fe-react-goblin-system/foundationsβ theming and icon primitives.pkg-fe-react-goblin-system/systemβ low-level styling helpers.
The accent color powers gradients, badges, focus states, and docs chrome. Update it at runtime:
import { GoblinThemeProvider, CssBaseline } from 'pkg-fe-react-goblin-system'
const secondary = '#39ff14' // neon green
export function Shell({ children }: { children: React.ReactNode }) {
return (
<GoblinThemeProvider
theme={{
palette: {
mode: 'dark',
secondary: { main: secondary },
},
}}
>
<CssBaseline />
{children}
</GoblinThemeProvider>
)
}light/darkvariants, contrast text, and action overlays (hover,selected,focus) are generated automatically from the main color.- Docs and Storybook ship with an accent picker that writes to
localStorage; reuse the same hook in your app if you want end-user accent control.
.
ββ packages/ # Publishable source for foundations, components, and system helpers
β ββ components/ # Layout, navigation, inputs, data-display, surfaces, feedback, utilities
β ββ foundations/ # Theme factory, provider, global styles, icon set, color helpers
β ββ system/ # `sx` resolver and shared styling utilities
ββ .docs/ # Docusaurus workspace that renders the documentation site
ββ .story/ # Storybook configuration mirroring the runtime theme contract
ββ docs/ # Markdown content consumed by Docusaurus
ββ dist/ # Build artefacts (`lib`, `storybook`, `docusaurus`)
ββ assets/ # Project branding and shared imagery
| Command | What it does |
|---|---|
npm run docusaurus:dev |
Start the Docusaurus site with hot reload on port 3000. |
npm run docusaurus:build |
Build static docs to dist/docusaurus and copy Storybook assets. |
npm run storybook:dev |
Launch Storybook with dark mode + accent controls. |
npm run storybook:build |
Emit static Storybook at dist/storybook. |
npm run lib:build |
Produce the component library bundle, types, and npm tarball under dist/lib. |
npm run lint / lint:fix |
Enforce ESLint across packages, docs, and stories. |
npm run format |
Format the repo with Prettier (TS/TSX/JS/JSON/MD). |
π Tip: every push to
mainthat bumps the version runsnpm run lib:build, publishes an updated tarball to the GitHub release, and keeps docs/Storybook in sync. For local work without hitting GitHub, runnpm run lib:buildand install the generated file fromdist/lib.
- Live Docs β cross-sections the architecture, theming model, and integration patterns.
π https://5h1ngy.github.io/pkg-fe-react-goblin-system/docs - Storybook β hands-on playground with controls wired to the same theme provider.
π https://5h1ngy.github.io/pkg-fe-react-goblin-system/storybook - Source Walkthrough β check
docs/getting-started.mdanddocs/styles/theme.mdfor code-focused tutorials inside the repo.
npm installto hydrate the workspace.npm run docusaurus:devornpm run storybook:devto iterate on visuals.- Update or add stories/docs alongside componentsβboth environments consume the same exports.
npm run lintandnpm run formatbefore opening a PR.
We keep the git history human-first: use descriptive commits, prefer smaller PRs, and include before/after screenshots or Storybook links when touching visuals.
MIT Β© 5h1ngy β feel free to remix, extend, and deploy the Goblin aesthetic in your own projects.
