Documentation is essential to upholding quality and cohesion. Articulate and thorough documentation allows for users and contributors to acquire knowledge more efficiently, motivating further contribution and information sharing. Referring to documentation helps to reduce redundancy in components and features while ensuring all implemented features are being used appropriately and to their fullest potential.
When a new component or feature is added, supporting documentation should be written to communicate and provide guidelines for its proper usage. Additionally, if changes are made to existing components that affect their usage or functionality, the documentation should reflect these changes.
To get started, use the
Please refer to the
The way we write is simple and direct, and for all reading levels. It should be understandable by anyone regardless of their culture, language, or ability. We aim to provide the right amount of context so our users know how to use Pharos components or elements successfully.
We use the same template for each of the components to create predictability in understanding their purpose, standards, and variations. We also aim to use consistent language in all documentation so users experience a seamless transition as they make their way through the site.
Wherever possible, write headings and titles in sentence case — studies indicate that sentence case is easier to read, plus title case can come across as heavy and overly serious.
Title of the Component (singular)
Tweet-length description of the component and its purpose.
Explain the implementation of the element (e.g. orientation, placement, use cases). Indicate any behavior that a user would need to know that should happen when using this component in their UI.
Explain appropriate use cases for the component, general guidelines to follow when using, and other considerations that should be made in the component's usage.
Include common misuse cases for the component, common errors made in its usage, and other actions to avoid.
If a component has content, please include guidelines for how the content should be written for the needs of the component (e.g., how labels should be written).
If a component has variants, display an example of the Pharos variant along with their title, purposes, and use cases (e.g. Error, Warning, Info, and Success Alerts).
If a component has multiple states (e.g. disabled, enabled, error, required), please include them. Include an example of the component in each state.
Include any WCAG guidelines that are applicable to the component for reference.
If a component has any design elements that are specifically for accessibility reasons add that here. This section will not always appear as previous sections in the documentation may cover this content.
Outlines any code needed to successfully implement the component. Semantic elements should be
indicated with <code> tags for clarity. In addition, include any important points
pertaining to implementation.
Include any relevant keyboard commands and their behavior. There also needs to be a screen reader section, which should list what to expect audibly when interacting with a component.