This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.
This is a monorepo containing @sect/solid-hiding-header, a SolidJS component library that provides hiding header functionality on scroll. It's a port of the React version, wrapping the vanilla hiding-header library with SolidJS-specific components and context.
Monorepo Commands (run from root):
pnpm dev- Start development for all packagespnpm build- Build all packagespnpm test- Run tests across all packagespnpm test:watch- Run tests in watch modepnpm test:e2e- Run E2E tests (Playwright) for demo apppnpm lint- Lint all packagespnpm lint:fix- Fix linting issuespnpm type-check- TypeScript type checking across all packagespnpm clean- Clean all build artifacts and node_modules
Single Test Commands:
- In
packages/solid-hiding-header/:pnpm test(Vitest) - In
apps/solidjs-boilerplate/:pnpm test:e2e(Playwright)
packages/solid-hiding-header/- The main library packageapps/solidjs-boilerplate/- Demo application showcasing the library- Uses Turborepo for build orchestration and pnpm workspaces
- Main Component:
HidingHeader- Wraps content and provides hiding functionality - Context System: Provides access to hiding header controls via React-like context pattern
- Hooks:
useHidingHeader,useRunHidingHeader,usePauseHidingHeader, etc. - Core Dependency: Built on top of
hiding-headervanilla JavaScript library - Build: Uses Rollup with
rollup-preset-solidfor multiple output formats (ESM, CJS, types)
- Framework: SolidJS with TypeScript
- Styling: TailwindCSS v4
- Routing: @solidjs/router
- State: SolidJS signals and stores
- Build: Vite with vite-plugin-solid
- Testing: Vitest for unit tests, Playwright for E2E
The library requires importing CSS from the hiding-header package:
@import 'node_modules/hiding-header/dist/style.css';The demo app uses the library via workspace reference:
"@sect/solid-hiding-header": "workspace:*"import { HidingHeader } from '@sect/solid-hiding-header';
// Basic usage
<HidingHeader>
<header>Content</header>
</HidingHeader>
// With custom component
<HidingHeader component="header">
<div>Content</div>
</HidingHeader>- Unit Tests: Vitest with SolidJS Testing Library
- E2E Tests: Playwright for full integration testing
- Coverage: Available via
pnpm coverage
- ESLint: Airbnb TypeScript config with SolidJS plugin
- Prettier: Consistent code formatting
- Husky: Pre-commit hooks with lint-staged
- Commitlint: Conventional commit messages
- TypeScript: Strict type checking enabled
- Uses Changesets for version management
pnpm changeset- Create changesetpnpm version-packages- Update versionspnpm release- Build and publish to npm