A lightweight, polymorphic React component library with intuitive design tokens and built-in theming system.
npm install stoop
# or
bun add stoop
Wrap your app with the StoopProvider
:
import { StoopProvider } from "stoop";
function App() {
return (
<StoopProvider theme="light">
{/* Your app content */}
</StoopProvider>
);
}
import { Stack, Text, Button } from "stoop";
function MyComponent() {
return (
<Stack gap="medium">
<Text as="h1">Welcome</Text>
<Button>Click me</Button>
</Stack>
);
}
import { useTheme, Button } from "stoop";
function ThemeToggle() {
const { themeName, setTheme } = useTheme();
return (
<Button onClick={() => setTheme(themeName === 'light' ? 'dark' : 'light')}>
Switch to {themeName === 'light' ? 'Dark' : 'Light'}
</Button>
);
}
For local development:
# Install dependencies
bun install
# Start development server
bun run dev
# Build the library
bun run build
# Lint and format
bun run lint
bun run prettier
Feel free to get in touch with feedback, advice or suggestions. See Conventional Commits for new contributors.
MIT © Jackson Dolman