@rgrmdesign/rgrm-ds-core
v0.6.0
Published
Framework-agnostic logic (class name builders, shared types) for the RGRM design system.
Maintainers
Readme
@rgrmdesign/rgrm-ds-core
Framework-agnostic building blocks for the RGRM design system: BEM class name builders and shared types used by the React and Web Component packages.
This package has no styling and no framework dependency. Most apps consume
@rgrmdesign/rgrm-ds-react, @rgrmdesign/rgrm-ds-elements
or @rgrmdesign/rgrm-ds-css instead of importing this directly.
Install
pnpm add @rgrmdesign/rgrm-ds-coreUsage
import { paragraphClassNames, type ParagraphSize } from '@rgrmdesign/rgrm-ds-core/paragraph';
paragraphClassNames('large'); // "rgrm-paragraph rgrm-paragraph--large"import {
headingClassNames,
type HeadingAppearance,
type HeadingLevel,
} from '@rgrmdesign/rgrm-ds-core/heading';
headingClassNames(1); // "rgrm-heading rgrm-heading--h1"
headingClassNames('display'); // "rgrm-heading rgrm-heading--display"Each component exposes its logic under a sub-path export (e.g. /paragraph).
The root export (.) re-exports everything.
