@hawaii-gov/shared-theme-package
v1.11.0
Published
Shared Tailwind theme config and base styles for Next.js apps
Maintainers
Readme
@hawaii-gov/shared-theme-package
Shared Tailwind theme tokens and reusable base/component styles for Next.js apps.
Install
npm install @hawaii-gov/shared-theme-packageUsage (Next.js + Tailwind v4)
- Import the package stylesheet from your global CSS file.
/* app/globals.css */
@import "@hawaii-gov/shared-theme-package/styles.css";- Ensure your root layout imports
globals.css.
// app/layout.tsx
import "./globals.css";
export default function RootLayout({ children }: { children: React.ReactNode }) {
return (
<html lang="en">
<body>{children}</body>
</html>
);
}Usage (Tailwind config preset style)
If your setup uses tailwind.config.js, extend your project with this package as a preset:
// tailwind.config.js
module.exports = {
presets: [require("@hawaii-gov/shared-theme-package")],
content: ["./app/**/*.{js,ts,jsx,tsx}", "./components/**/*.{js,ts,jsx,tsx}"],
};Exports
@hawaii-gov/shared-theme-package@hawaii-gov/shared-theme-package/tailwind.config@hawaii-gov/shared-theme-package/styles.css
Notes
- This package expects
tailwindcssversion^4.0.0as a peer dependency.
Publish to GitHub Packages
- Create a classic personal access token on GitHub with:
write:packagesread:packagesrepo(only needed for private repository flows)
- In your terminal, set the token in this session:
$env:GITHUB_TOKEN = "<your_github_pat>"- Publish:
npm publish- Install from another project (authenticated):
npm install @hawaii-gov/shared-theme-package