[ Docs ] Guidelines for Primitives
Zach Nugent edited this page Mar 1, 2024
·
1 revision
If you would like to participate in writing the documentation for primitives, please follow the template below and refer to the example docs and the example for using primitives.
Example Docs: Portal
Example Using Primitives: Starter-Base
- Use a
<LinkButton target="_blank" />
for external dependencies (ex: @radix-ui/react-accordion). - A short description of the primitive.
- Features (optional): Use
<Card title="Features" />
and add an unordered list of its features. - Use the
## Installation
heading. - Add installation steps in bold and use the
<Code code={importedCode} lang="tsx" title="~/components/primitives/${component}" />
for all the related files. - Use the
## Usage
heading. - Show an example of usage. Avoid using the
<Code />
component since the reader should see the entire usage example. - Use the
## Props
. - Write each component as an h3 heading, optionally add a short description, and add a table for all of that components props. Ex:
| Prop | Type | Note |
| :--: | :---------------: | :--------------------------------------: |
| | | |