Thank you for your interest in contributing to Wigggle UI! We appreciate your support and look forward to your contributions. We strongly recommend that you check for open issues and pull requests to see if someone else is working on something similar.
-
Fork this repository Click here to fork the repository.
-
Clone your forked repository to your local machine
git clone https://github.com/<YOUR_USERNAME>/wigggle-ui.git
-
Navigate to the project directory
cd wigggle-ui -
Create a new branch for your changes
git checkout -b my-new-branch
-
Install dependencies
pnpm i
-
Create a
.env.localfiletouch .env.local && echo "NEXT_PUBLIC_APP_URL=http://localhost:3000" > .env.local
-
Run the project
pnpm dev
To add a new widget to Wigggle UI, you will need to modify several files.
Widgets are divided into categories such as Clock, Weather, Calendar, etc.
You would either:
- Put your new widget in an existing category or
- Create a new category for your widget.
Make sure categories follow the same naming convention.
- Category Name should be in title case and should be singular.
- Make sure categories are not duplicated. (e.g. Clock and Time)
Check the category folders inside registry/default/widgets and create a file for your new widget. Every widget is a numbered file inside the category folder.
Widget Naming Convention: [CATEGORY-NAME]-[WIDGET-NUMBER].tsx
Example: calendar-07.tsx
Create the main widget in registry/default/widgets/[CATEGORY-NAME]/[WIDGET-NUMBER].tsx
import React from 'react'
export default function WidgetDemo() {
return (
<div>
This is your new Widget.
</div>
)
}Add your widget to the config in config/widgets.ts. Make sure you add the new widget to the correct category.
If you are adding a new category, make sure you add the boolean isNew to the category object.
{
slug: "calendar",
name: "Calendar",
widgets: [
{ name: "calendar-01" },
{ name: "calendar-02" },
{ name: "calendar-03" },
{ name: "calendar-04" },
{ name: "calendar-05" }, // Your new widget
],
isNew: true, // If you are adding a new category
},Once you add your widget to the config, you need to add it to the registry. The registry follows the same structure and config as shadcn/ui registry. You can check their docs to learn more.
{
"name": "calendar-05",
"type": "registry:component",
"registryDependencies": [
"https://wigggle-ui.vercel.app/r/widget.json",
"https://wigggle-ui.vercel.app/r/badge.json",
"https://wigggle-ui.vercel.app/r/label.json"
],
"files": [
{
"path": "registry/default/widgets/calendar/calendar-05.tsx",
"type": "registry:component"
}
],
"meta": {
"tags": ["calendar"]
}
},You can see the JSON Schema for widget-number.json here.
Make sure to add any necessary dependencies, tailwind configurations, or other properties as needed for your specific component.
pnpm build:registryOnce you have added your widget to the config and the registry, test your widget on your local machine. Make sure you cover the edge cases and test the widget in different environments.
Pointers:
- Test the widget in different environments such as Next.js, React, Vue, Svelte, etc.
- Test the widget in different themes such as light, dark, and system.
- Test the widget in different screen sizes and orientations.
- Test the widget in different browsers such as Chrome, Firefox, Safari, Edge, etc.
Before you create a Pull Request, please check whether your commits comply with the commit conventions used in this repository.
When you create a commit we kindly ask you to follow the convention
category(scope or module): message in your commit message while using one of
the following categories:
-
feat / feature: all changes that introduce completely new code or new features -
fix: changes that fix a bug (ideally you will additionally reference an issue if present) -
refactor: any code related change that is not a fix nor a feature -
docs: changing existing or creating new documentation (i.e. README, docs for usage of a lib or cli usage) -
build: all changes regarding the build of the software, changes to dependencies or the addition of new dependencies -
chore: all changes to the repository that do not fit into any of the above categoriese.g.
feat(widgets): add new prop to the clock-12 widget
If you are interested in the detailed specification you can visit https://www.conventionalcommits.org/ or check out the Angular Commit Message Guidelines.
Once you are satisfied with your widget, submit it by filing a pull request to the main repository.
Please make sure you do the following:
- Add a descriptive title and description to your pull request.
- Provide a demo video / screenshot of your widget in action.
- Add
henilshahdevas a reviewer. - Add yourself as an assignee.
For any help or questions, please open a new GitHub issue or reach out to me on Twitter.