// Contributing
Help shape Hygular.
One focused contribution at a time.
Hygular brings semantic utility CSS, reusable components, and a lightweight JavaScript runtime together. Bug reports, documentation corrections, accessibility improvements, and focused code changes are all welcome.
Design principles
Keep styling, components, and behavior consistent when making changes.
--engine: css-first;Use the platform
Use CSS for layout, styling, and states it can express reliably. Use JavaScript for behavior that needs it, with keyboard access and focus management built in.
--runtime: dependency-free;Keep the runtime focused
Preserve declarative initialization and programmatic component APIs where implemented. Keep the vanilla runtime dependency-free and React integration optional.
--theme: shared-tokens;Build on shared tokens
Reuse existing theme tokens and CSS layers. Check responsive layouts, relevant themes, contrast, and RTL behavior when adding or changing styles.
Where to work
Start with the source directory that matches your change. Rebuild generated files instead of editing dist/ directly.
src/cssStyles and tokens
Theme tokens, base styles, reusable components, and semantic utilities in their CSS layers.
src/jsJavaScript runtime
Vanilla components, lifecycle handling, event utilities, and shared helpers.
src/reactReact integration
The optional React adapter and its TypeScript declarations, kept in sync with the core API.
buildBuild helpers
Framework build utilities, including breakpoint handling. Bundle configuration lives in rollup.config.js.
The optional @hygular/cli package is developed and versioned separately. Compiler, scanning, cache, and watch changes belong there. Changes to hygular/css/source or default breakpoints need a compatibility check with the CLI.
Local setup
Clone the repository to explore it, or clone your own fork if you plan to submit a pull request. Install dependencies, build, then start Rollup watch mode when needed.
$ git clone https://github.com/Hygular/Hygular.git$ cd Hygular$ npm install$ npm run build$ npm run build:watchWatch mode rebuilds distribution files; it does not start a web server. Use a local page or a relevant example to check browser behavior.
Before opening a pull request
Keep the change focused and explain the problem it solves. Run the build, reproduce the affected behavior, and report what you tested. Check keyboard access, focus, responsive layouts, and relevant browsers where the change affects them. Update declarations and React bindings when a public API changes.
Add user-facing changes under [Unreleased] in CHANGELOG.md. For a new component or substantial API or architecture change, open an issue before implementation.
Coding conventions, commit format, and the review process are documented in CONTRIBUTING.md.