Overview
In this section, we'll explain the basics of the Nova component library.
What is a component library
The Nova component library is one aspect of the Nova design system, which provides a reusable library of modular components.
Components are developed with Nova standards in mind, which are guided by product, design, and technical requirements for our brands.
Where is the component library
You can find the component library at pmc-plugins/pmc-nova/style-guide/components (link (opens in a new tab)).
What does the component library contain
Every folder in the component library corresponds to a single Nova component, which consists of multiple files which work together within the rest of the Nova framework.
Note: The unit tests for class-model.php and class-controller.php are located in pmc-nova/tests/style-guide/components due to speed limitations around PHPUnit's directory scanning.
Common Tasks
Scaffold a new component
From the root of the style guide,
npm run nova scaffold <component-name>Frequently Asked Questions
What does null mean in Nova?
Using null in the context of a Nova component indicates that component shouldn't be rendered. As opposed to using a boolean, this means,
nullusage means something is a component.nullcan be used as a default, and then overridden in brand defaults by{}.- All component props defined in the schema should be
nullby default.
Why don't we use atomic design terms?
Nova specifically avoids Atomic Design (opens in a new tab) terms like atoms, molecules, and organisms.
While useful to understand the principals of design systems and component libraries, we avoid making any technical distinction between these uses to provide additional simplicity during our development process.
From tiny components that are only used as a wrapper (Taboola) to the most complex templates (homepage), everything in Nova is a component.