Luan Carlos
Robert Johnson
Jane Smith
Emily Davis
Tyler Durden
Dora

Contribute

Pixel Patterns is built by the community. Fork the repository, add your component and open a pull request — every snippet helps other developers ship beautiful interfaces faster.

Code

Setup

  1. Fork the Repository

    Click the "Fork" button on the repository page to create a copy of the project in your GitHub account.

  2. Clone the Repository

    Clone the forked repository to your local machine:

    bash

    git clone https://github.com/Luancss/pixel-patterns

  3. Create a New Branch

    Create a branch for your changes, named after what you're working on:

    bash

    git checkout -b my-feature

  4. Make Your Changes

    Implement the changes: add new components, fix bugs or improve the documentation.

    To add a component, open the collection file in src/features/snippets/data/ and place your snippet at the end of the array, below all the others. New collections are registered once in src/features/snippets/config/collections.ts — the route, navigation and page metadata are generated from it.

    src/features/snippets/
    ├── config/collections.ts   # slug, title, description, layout
    ├── data/
    │   ├── index.ts            # maps each slug to its snippets
    │   ├── buttons.tsx
    │   └── your-collection.tsx # add your snippet here
    ├── components/             # gallery, card, preview dialog
    └── types.ts

    TailwindIf your component uses Tailwind, follow this structure:

    src/features/snippets/data/your-collection.tsxJavaScript
    {  category: "tailwind",  background: "bg-green-950 or bg-[#212121]" /* Use one of these ways */,  iconColor: "#fff" /* #fff or #000 */,  content: (    /* Add your code here */  ),},

    CSSIf your component uses CSS, follow this structure:

    Add 5 random digits to every class in your component to avoid conflicts with existing and future components.

    Example:

    <button>Click me</button>
    <button class="button83501">Click me</button>
    src/features/snippets/data/your-collection.tsxJavaScript
    {  category: "css",  background: "bg-green-950 or bg-[#212121]" /* Use one of these ways */,  iconColor: "#fff" /* #fff or #000 */,  html: `    /* Add your html here */    <style>      /* Add your css here */    </style>  `,},
  5. Commit Your Changes

    Commit your work with a clear, descriptive message:

    bash

    git add .

    git commit -m "Add new feature for XYZ"

  6. Push Your Changes to GitHub

    Push the branch to your fork:

    bash

    git push origin my-feature

  7. Open a Pull Request

    Go back to the original repository and click "New Pull Request". Describe what you changed and why, so it can be reviewed and merged into the main project.

  8. Wait for Review

    We'll review your contribution. If everything looks good it gets merged; if changes are needed, we'll leave feedback so you can adjust it.