Basic Concepts
Each package within xui is independently versioned and released to npm following the @cozmos-ui/
naming convention.
A package's exports may vary, sometimes exporting only a single item, sometimes many. This structure is rougly represented by the heirarchy of the docs navigation menu.
Let's look at an example. Say we want to use the Checkbox
component from the forms
package in our application.
Installing
All examples throughout the site use yarn. If using npm, swap out yarn add
for npm install
.
*Note: An install command and import statement can be found at the top each docs page. Look for the clipboard icon for a quick copy.
yarn add @cozmos-ui/forms# Ornpm install @cozmos-ui/forms
Importing
*Note: All exports are named to enhance tree-shaking.
import { Checkbox } @cozmos-ui/forms;