react-w3css-components
v0.1.0
Published
Composable, accessible React components styled with W3.CSS.
Readme
react-w3css-components
A reusable React and TypeScript component library built on W3.CSS. Components use native HTML semantics, expose standard React props, and let applications extend styles with className.
Requirements
- Node.js 20 or newer
- React 18 or newer
- React DOM 18 or newer
- W3.CSS 4.1 or newer (installed automatically with this package)
Install
npm install react-w3css-components react react-domUsage
Import the library stylesheet once in your application entry point, then use named component exports:
import "react-w3css-components/style.css";
import { Button } from "react-w3css-components";
export function SaveAction() {
return <Button className="w3-green">Save changes</Button>;
}The package declares W3.CSS as a runtime dependency, and the stylesheet entry includes it automatically. Components do not add application-specific behavior; the Button accepts standard button attributes and defaults to type="button".
Development
npm install
npm run storybook
npm run test
npm run lint
npm run buildnpm run build generates ESM and CommonJS bundles plus TypeScript declarations in dist/. npm run build-storybook creates the static Storybook site.
License
MIT
