v1.2.0
Handoff 1.2.0 introduces support for patterns and modernizes the way projects are configured and declared. This release expands Handoff beyond individual component documentation into higher-level design system composition, while also improving TypeScript support, preview usability, and day-to-day build reliability.
Highlights
- Added support for design system patterns
- Added support for typed TypeScript and JavaScript config and declaration files
- Introduced
.handoff.ts|jsas the preferred declaration convention, along with typed helper APIs - Added usage snippets and improved preview behavior for React and CSF components
- Improved incremental builds, artifact cleanup, and logging
Patterns
Patterns are now part of the Handoff workflow.
Patterns can now be registered through entries.patterns, with Handoff generating dedicated API artifacts and exposing them in the documentation UI under a new Patterns section. Patterns support composing multiple component previews into a single page, including both existing named previews and inline args for pattern-specific compositions.
This makes it possible to document larger assemblies and reusable design system compositions, not just isolated components.
Typed Config and Declaration Workflow
This release significantly improves the authoring experience for teams using TypeScript.
Handoff now supports typed TypeScript and JavaScript config and declaration files across the project workflow. TypeScript-based config and declaration files are now the preferred convention, while JavaScript remains supported and available for teams that want it. Root config resolution is also clearer when multiple config files are present.
This release also establishes .handoff.ts and .handoff.js as the preferred convention for component and pattern declarations, along with structured helper APIs such as defineConfig, defineReactComponent, defineHandlebarsComponent, defineCsfComponent, and definePattern.
Scaffolding and CLI flows were updated to support both TypeScript and JavaScript project setup, and generated examples now follow the newer .handoff.* declaration convention.
Preview and Usage Improvements
Component previews now provide more useful, usage-oriented output.
This release adds usage snippets as a new documentation feature, with output that reflects the currently selected preview variant. CSF preview handling has also been improved to generate more actionable implementation examples for React and Storybook-style components. These changes make the documentation more helpful for engineers consuming the design system.
General Improvements
This release also improves reliability across the build and development workflow.
Incremental rebuild behavior is more selective, stale generated artifacts are cleaned up more consistently, and summary artifacts stay better aligned with source changes. Logging has also been improved with clearer scoped output across Handoff, Vite, and Next.js processes, making local development and debugging easier.
Upgrade Notes
Projects can continue using existing configuration formats, but new and updated setups should prefer:
- TypeScript-based config and declaration files where possible
.handoff.*declaration files for components and patterns