--- name: ui-design-patterns description: Common interface patterns, navigation patterns, form patterns, data display patterns, feedback patterns, and accessibility considerations category: design tags: [ui, patterns, components, navigation, forms, accessibility, interaction-design] version: 1.0.0 --- # UI Design Patterns A comprehensive guide to common user interface design patterns, component patterns, interaction patterns, and accessibility best practices for building modern web and mobile applications. ## When to Use This Skill Use this skill when you need to: - **Design User Interfaces**: Create intuitive and user-friendly interface designs - **Implement UI Components**: Build reusable interface components following established patterns - **Solve UX Problems**: Address common user experience challenges with proven solutions - **Ensure Accessibility**: Make interfaces accessible to all users including those with disabilities - **Build Design Systems**: Create consistent component libraries and design systems - **Review Interfaces**: Evaluate existing interfaces for usability and best practices - **Prototype Interactions**: Design and implement interactive UI behaviors - **Optimize Navigation**: Structure information architecture and navigation flows - **Handle Form Design**: Create effective forms with proper validation and feedback - **Display Data**: Present complex data in clear, scannable formats - **Provide Feedback**: Communicate system state and user actions effectively - **Responsive Design**: Adapt interfaces for different screen sizes and devices ## Core Concepts ### UI Patterns UI patterns are reusable solutions to common design problems. They provide: - **Consistency**: Users recognize familiar patterns across applications - **Efficiency**: Proven solutions save design and development time - **Usability**: Patterns are tested and refined through widespread use - **Communication**: Shared vocabulary for designers and developers - **Accessibility**: Established patterns often include accessibility considerations ### Design Systems A design system is a collection of reusable components, patterns, and guidelines: - **Component Library**: Reusable UI building blocks - **Design Tokens**: Variables for colors, spacing, typography - **Usage Guidelines**: When and how to use each component - **Accessibility Standards**: WCAG compliance requirements - **Code Examples**: Implementation references - **Documentation**: Comprehensive guides and principles ### Atomic Design Methodology Breaking interfaces into atomic units: - **Atoms**: Basic building blocks (buttons, inputs, labels) - **Molecules**: Simple combinations of atoms (search field with button) - **Organisms**: Complex components (headers, forms, cards) - **Templates**: Page-level layouts - **Pages**: Specific instances with real content ## Navigation Patterns ### 1. Tabs Pattern Organize content into multiple panels shown one at a time. **When to Use**: - Related content categories at the same hierarchy level - Limited number of sections (3-7 tabs ideal) - User needs to switch between views frequently - Screen space is limited **Anatomy**: ``` [Tab 1] [Tab 2] [Tab 3] ───────────────────────── Content for active tab ``` **Best Practices**: - Highlight active tab clearly - Keep tab labels short and descriptive - Maintain state when switching tabs - Use icons + text for clarity - Ensure keyboard navigation works - Consider mobile alternatives (dropdown, segmented control) **Accessibility**: - Use ARIA `role="tablist"`, `role="tab"`, `role="tabpanel"` - Implement arrow key navigation - Set `aria-selected` and `aria-controls` - Ensure tab panels are focusable **Example HTML**: ```html
Overview content...
``` ### 2. Accordion Pattern Vertically stacked sections with expand/collapse functionality. **When to Use**: - Long pages with distinct sections - Progressive disclosure of information - FAQ sections - Settings panels - Limited screen space **Types**: - **Single Expand**: Only one panel open at a time - **Multi Expand**: Multiple panels can be open simultaneously - **Nested**: Accordions within accordions **Best Practices**: - Use clear, descriptive headers - Provide visual indicators (chevron, +/-) - Consider default state (collapsed vs first open) - Animate transitions smoothly (200-300ms) - Maintain content when collapsed - Allow keyboard control **Accessibility**: - Use ` ``` ### 3. Breadcrumbs Pattern Show user's location in site hierarchy. **When to Use**: - Deep site hierarchies (3+ levels) - E-commerce category navigation - Documentation sites - Multi-step processes **Best Practices**: - Show current location clearly - Make previous levels clickable - Use appropriate separators (>, /, →) - Keep labels concise - Consider mobile truncation - Place at top of page **Accessibility**: - Use `