--- name: daisy-ui description: A Tailwind CSS component library that provides a set of pre-designed UI components. Use for accessible, themed components that match Williamstown SC brand. --- # daisy-ui ## Instructions Follow documentation from [./llms.txt](./llms.txt) to produce code that uses DaisyUI components and themes according to the project's tech stack and coding standards outlined in the main [CLAUDE.md](../../CLAUDE.md) file. ## Theme Customization Configure DaisyUI theme in `tailwind.config.js` for Williamstown SC brand identity: ### Primary Colors - `primary`: #062174 (Club blue - traditional, trustworthy) - `secondary`: #DEB100 (Club yellow/gold - energy, visibility) - `accent`: #10B981 (Green - soccer field aesthetic) - `neutral`: #1F2937 (Dark gray for text) - `base-100`: #FFFFFF (White backgrounds) - `base-200`: #F3F4F6 (Light gray backgrounds) - `base-300`: #E5E7EB (Medium gray borders) ### Typography Guidelines - Use `font-sans` with system fonts or Inter - Ensure minimum 16px base font size for accessibility - Apply proper line-height (1.5+ for body text) - Use font-weight variations: 400 (regular), 500 (medium), 600 (semibold), 700 (bold) ### Theme Configuration Example ```js // tailwind.config.js module.exports = { plugins: [require('daisyui')], daisyui: { themes: [ { williamstown: { primary: '#062174', // Club blue 'primary-content': '#FFFFFF', secondary: '#DEB100', // Club gold 'secondary-content': '#000000', accent: '#10B981', // Soccer green 'accent-content': '#FFFFFF', neutral: '#1F2937', 'neutral-content': '#FFFFFF', 'base-100': '#FFFFFF', // White 'base-200': '#F3F4F6', // Light gray 'base-300': '#E5E7EB', // Medium gray 'base-content': '#1F2937', info: '#3ABFF8', 'info-content': '#000000', success: '#36D399', 'success-content': '#000000', warning: '#FBBD23', 'warning-content': '#000000', error: '#F87272', 'error-content': '#000000' } } ] } }; ``` ## Component Selection ### Use DaisyUI Components For **Navigation & Menus:** - `navbar` - Top navigation bar - `menu` - Vertical/horizontal menu lists - `dropdown` - Dropdown menus - `drawer` - Mobile slide-out navigation - `breadcrumbs` - Page navigation trail **Actions:** - `btn` - Buttons with variants (btn-primary, btn-secondary, btn-ghost, btn-outline) - `btn-group` - Grouped button sets - `swap` - Toggle/swap icons (menu hamburger) - `link` - Styled links **Data Display:** - `card` - Content cards for news, fixtures, players - `badge` - Labels and tags - `avatar` - Profile pictures - `stat` - Statistics display (goals, wins, etc.) - `table` - Data tables for fixtures/results - `timeline` - Match history timeline **Forms:** - `input` - Text inputs with validation states - `textarea` - Multi-line text - `select` - Dropdown select - `checkbox` - Checkboxes - `radio` - Radio buttons - `toggle` - Toggle switches - `range` - Range sliders - `file-input` - File upload **Feedback:** - `alert` - Notifications and messages - `modal` - Modal dialogs - `toast` - Toast notifications - `loading` - Loading spinners - `skeleton` - Loading skeletons - `progress` - Progress bars **Layout:** - `divider` - Section dividers - `stack` - Vertical stacking - `join` - Join elements together - `indicator` - Notification indicators ### Use Custom Tailwind For - Hero sections with glassmorphism effects - Complex asymmetric layouts - Custom animations and transitions - Grid-breaking designs from frontend-design skill - Unique spacing patterns - Advanced visual effects (backdrop-blur, gradients) ## Accessibility Patterns ### WCAG AA Compliance 1. **Color Contrast:** - DaisyUI automatically ensures contrast for text/background combinations - Verify custom colors meet 4.5:1 ratio for normal text - Verify custom colors meet 3:1 ratio for large text (18px+) 2. **Touch Targets:** - Use `btn-lg` for primary CTAs (ensures 44x44px minimum) - Default `btn` is 48px height (meets requirements) - Use `btn-sm` sparingly, only for secondary actions 3. **Form Accessibility:** ```jsx ``` 4. **Focus States:** - DaisyUI includes visible focus indicators by default - Test all interactive elements with keyboard navigation - Use `focus:` variants for custom styling 5. **Semantic HTML:** - DaisyUI components use proper semantic HTML - Add ARIA labels where needed: `aria-label`, `aria-describedby` - Use `role` attribute for custom components ## Common Patterns for Sports Clubs ### Match/Fixture Card ```jsx
Williamstown SC
2 - 1
Opposition FC
Exciting announcement about our coaching lineup for the upcoming season...
Midfielder
6:00 PM - 9:00 PM
Join us for the official 2026 season launch with the new coaching team...
| Date | Home | Score | Away | Status |
|---|---|---|---|---|
| Nov 15 | Williamstown SC | 2 - 1 | Opposition FC |
Win
|