--- name: panda-form-architecture description: Design and implement composable form component architectures using atomic design principles with Panda CSS --- # Panda CSS Form Architecture ## When to Use This Skill Use this skill when: - Building a form component system from scratch - Refactoring existing forms to use composable patterns - Creating form field wrappers for consistent accessibility and error handling - Implementing a design system's form components - Establishing form component hierarchy and composition patterns For implementing individual form components (buttons, inputs), also reference **panda-component-impl**. For creating recipes for these components, use **panda-recipe-patterns**. ## Form Component Composability Philosophy Form components should follow a progressive composition model where simpler components combine into more complex ones. This atomic design approach creates: - **Reusability**: Foundational components work in multiple contexts - **Consistency**: Shared primitives ensure visual and behavioral uniformity - **Flexibility**: Compose components differently for different use cases - **Maintainability**: Changes to primitives cascade to all consumers ## Three-Layer Architecture ### Layer 1: Atomic Components (Primitives) The foundational styled elements that map directly to HTML form controls. **Characteristics:** - Single responsibility (one HTML element) - No internal composition - Accept Panda CSS style props for customization - Minimal logic (mostly styling) **Components:** ```typescript // Polymorphic base (any HTML element)