Cosmos React Components
Note: This project is pre-alpha and should not be used in a production environment.
Cosmos is the name of StackPath's Design System.
This package is a set of React wrapper components around the Cosmos Web Components package.
Installation
To install the React component bindings:
npm install @stackpath/cosmos-react-components
Usage
The package will automatically define the underlying Custom Elements in your project, so you don't need to do it manually.
Import a component:
import { CosmosButton } from '@stackpath/cosmos-react-components/dist'
Use the component in your JSX:
<main>
<CosmosButton type='primary' label='Primary Button' icon='check' onClick={(event) => console.log('Clicked primary button')} />
</main>