This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.
This is the Vaadin Web Components monorepo - a collection of high-quality, accessible web components built with Lit and designed for business web applications. The repository contains both Apache-licensed core components and commercially-licensed Pro components.
packages/: Individual component packages (each has src/, test/, and entry files)packages/component-base/: Core utilities and mixins shared across componentspackages/a11y-base/: Accessibility mixins and utilitiespackages/field-base/: Field component mixins and utilitiespackages/aura/: Aura themepackages/vaadin-lumo-styles/: Lumo themepackages/vaadin-themable-mixin/: Theming infrastructuretest/integration/: Cross-component integration testsdev/: Development playground with component examples for manual testing
All component packages under packages/ follow the same file structure:
packages/button/
├── src/ # Implementation files
├── test/ # Test files
├── vaadin-button.js # Main entry point
├── vaadin-button.d.ts # TypeScript definition entry point
├── package.json
All components follow a consistent pattern:
- Use LitElement as the base class
- Use mixins for shared functionality (ElementMixin, ThemableMixin, etc.)
- Have TypeScript definitions alongside JavaScript implementations
- Include comprehensive test suites (unit, visual, integration)
- Support both Lumo and Aura themes
ElementMixin: Core Vaadin functionalityThemableMixin: Theme registration and style injectionFocusMixin: Focus and focus-ring state managementButtonMixin,FieldMixin, etc.: Component-specific shared behaviorPolylitMixin: Bridge between Polymer and Lit APIs
- Unit tests: Mocha + Chai + Sinon using Web Test Runner
- Visual tests: Screenshot comparison for themes
- Snapshot tests: DOM structure validation
- Integration tests: Cross-component interaction testing
yarn install # Install dependencies
yarn start # Start development server (opens /dev)
yarn start:lumo # Start with Lumo theme specifically
yarn start:aura # Start with Aura theme specificallyyarn test # Run tests for changed packages only
yarn test --all # Run tests for all packages
yarn test --group combo-box # Run tests for specific component
yarn test --group combo-box --glob="data-provider*" # Run specific tests for specific component
yarn test:firefox # Run tests in Firefox
yarn test:webkit # Run tests in WebKityarn test:base # Visual tests for component base styles
yarn test:lumo # Visual tests for Lumo theme
yarn test:aura # Visual tests for Aura theme
yarn test:snapshots # DOM snapshot tests
yarn update:base # Update component base styles reference screenshots
yarn update:lumo # Update Lumo reference screenshots
yarn update:aura # Update Aura reference screenshots
yarn update:snapshots # Update DOM snapshotsAll visual and snapshot test commands support the same --group option to target specific components.
yarn test:it # Run integration testsyarn lint # Run all linting checks
yarn lint:js # ESLint and Prettier
yarn lint:css # Stylelint for themes
yarn lint:types # TypeScript type checking