@littlebigideas/sketchbook
v0.0.3
Published
A lightweight React + Tailwind component library
Maintainers
Readme
Sketchbook
A lightweight React + Tailwind component library for little big ideas.
Installation
npm install @littlebigideas/sketchbookUsage
Import the components and styles in your app:
import { Button, Card, Input } from '@littlebigideas/sketchbook'
import '@littlebigideas/sketchbook/styles'
function App() {
return (
<Card>
<Button variant="primary">Click me!</Button>
<Input label="Enter your name" />
</Card>
)
}Development
Install dependencies
npm installRun Storybook for development
npm run storybookBuild the library
npm run buildBuild Storybook for production
npm run build-storybookComponents
- Badge - A status indicator component with multiple variants and sizes
- Button - A versatile button component with multiple variants and sizes
- Card - A container component with header and content sections
- Input - A form input component with label, error, and helper text support
Storybook
View the component documentation and playground at GitHub Pages (after deployment).
Publishing & Releases
Automated Release Process (Recommended)
The package is automatically published to npm when you create a GitHub release.
Steps:
Update version in package.json:
npm version patch # For bug fixes (0.0.1 → 0.0.2) npm version minor # For new features (0.0.2 → 0.1.0) npm version major # For breaking changes (0.1.0 → 1.0.0)Push changes with tags:
git push origin main --tagsCreate a GitHub release (this triggers auto-publish):
# Using GitHub CLI gh release create v0.0.3 --title "Version 0.0.3" --notes "Description of changes" # Or via GitHub UI: Go to Releases → "Create a new release"The GitHub Action will automatically build and publish to npm!
Manual Publishing
If you need to publish manually:
First authenticate to npm:
npm loginUpdate version, build and publish:
npm version patch # Update version npm publish --access public
NPM Token Setup
For automated publishing, you need to add your npm token as a GitHub secret:
- Create an npm access token at npmjs.com
- In your GitHub repository, go to Settings → Secrets and variables → Actions
- Add a new secret named
NPM_TOKENwith your npm token as the value
GitHub Pages Setup (Already Configured)
The Storybook is automatically deployed to GitHub Pages when you push to main. View it at: https://devgetlittlebigideas.github.io/sketchbook/
License
MIT
