Contributing

Help improve the Valley Solar Design System. Whether you're adding a new component, fixing a bug, or improving documentation, here's how to contribute.

Before You Start

The design system is maintained in two places:

Changes are authored in Claude Design, then exported and committed to GitHub.

Adding a New Component

1. Design the component

Create a new design file in Claude Design to explore the component's states and variants. Test with real content.

2. Build the component

Create a .jsx or .tsx file with a .d.ts TypeScript definition. Use design tokens for all styling.

// Button.jsx
export function Button({ children, variant = 'primary' }) {
  return (
    <button className={`btn btn--${variant}`}>
      {children}
    </button>
  );
}

3. Create a design card

Add an HTML preview file with the @dsCard tag so the component appears in the design system gallery.

<!-- @dsCard group="02_Components" name="Button" -->

4. Test and iterate

Use the live preview in Claude Design to test interactive states, responsive behavior, and edge cases.

Modifying Tokens

Design tokens live in colors_and_type.css:

  1. Edit the CSS file to add or update tokens
  2. Update the documentation in docs-tokens.html
  3. Test all components to ensure they work with the new tokens
  4. Commit with a clear message: Update: Add new color token --vs-teal

Creating a New Template

Templates are full-page layouts ready to use or customize.

  1. Create a new folder: templates/[template-slug]/
  2. Add index.html with the template markup
  3. Include a @template comment at the top:
    <!-- @template name="Page — My Template" description="Brief description" group="04_Templates" -->
  4. Update templates-manifest.json to register the template
  5. Add the template to docs-templates.html

Fixing a Bug

  1. Identify the issue and locate the affected component or token
  2. Fix the code in Claude Design or the source file
  3. Test thoroughly before committing
  4. Commit with a clear message: Fix: Button hover state not visible on dark backgrounds

Commit Message Guidelines

Use clear, descriptive commit messages:

Before Committing

Design System Maintenance

Keep the design system healthy by:

Questions?

Open an issue on GitHub to ask questions or propose changes.