Before adding new components, please make sure you have read and understood the Fractal user guide.
Create a new folder within the components/
directory and within the appropriate subdirectory (based on the Tier that your component falls into) and follow the instructions in the Fractal user guide. Use existing components as guides for how to set up your markup and data.
Any CSS and JavaScript that should be distributed as part of the design system code library should go inside the CSS and JS files in the src/
directory. Markup is not distributed as part of the library so it should live in Handlebars templates in Fractal.
Important: Every component should have a README.md
file with complete documentation of how to use it (see template below).
If the component was designed before the existence of the design system and its code is not easy to move into the design system, you can add it as documentation only on the Legacy Components page.
As with normal components, use the template below for the documentation.
This is where you describe what the component is and how it works. For legacy components that don’t have code in the design system repository, include at least one screenshot.