Docs

Contributing components

Learn how to contribute components to Animata.

New components are very welcome. Note that if you are going to propose drastic changes, be sure to open an issue for discussion first, to make sure that your PR will be accepted before you spend effort coding it.

Generating a new component

Once you have the project set up, you can start contributing to Animata.

The first step is to generate a new component. You can use the yarn animata:new command to create a new component. This command will ask you the following questions and generate the required files for you.

? Enter a name for the new component ›

Simply enter the name of the component you want to create.

? Enter the description for the new component ›

Provide a brief description of the component. It will be used in the documentation.

? Select the type of component you want to create ›

It will list the available types of components. You can select one of them or create a new type. If you select + Create a new type then it will ask you to enter the name of the new type.

? Enter the name for the new type ›

Enter the name of the new type.

If you create a new type, you will see the following message:

You need to register the new type in the following file:
 
config/docs.ts - Add the new entry in docsConfig.sidebarNav

Simply open the config/docs.ts file and paste the new entry in the docsConfig.sidebarNav array.

Writing docs

The script above generates a placeholder documentation file for the new component. You can find the file in the content/docs/{type} directory. Update it with the relevant information about the component you are creating and remove the placeholder content.

Proposing pull requests

  • Making changes: implement your bug fix or feature and write stories to cover different use cases. Then commit your changes, push your bug fix/feature branch to the origin (your forked repo) and open a pull request to the upstream (the repository you originally forked)‘s main branch.

If you have any questions, feel free to reach out to us.