Reusable components for use internally and externally.
✅ Fully TypeScript Supported
✅ Leverages the power of React 18 Server components
✅ Compatible with all React 18 build systems/tools/frameworks
✅ Documented with Storybook
pnpm add cortex-react-components
or
npm install cortex-react-components
or
yarn add cortex-react-components
You need
r18gs
as a peer-dependency
You can import styles globally or within specific components.
/* globals.css */
@import "cortex-react-components/dist";
// layout.tsx
import "cortex-react-components/dist/index.css";
For selective imports:
/* globals.css */
@import "cortex-react-components/dist/client"; /** required if you are using LoaderContainer */
@import "cortex-react-components/dist/server/bars/bars1";
Using loaders is straightforward.
import { Bars1 } from "cortex-react-components";
export default function MyComponent() {
return someCondition ? <Bars1 /> : <>Something else...</>;
}