@saplings/ui-core
v0.17.2
Published
Platform-independent Murphi design tokens and responsive design language
Readme
@saplings/ui-core
Share theme tokens, spacing, typography, and responsive decisions across web and React Native.
Install
npm install @saplings/ui-coreQuick start
import { createTheme, getSemanticColors, spacingPx } from '@saplings/ui-core';
const theme = createTheme('dark', { primary: '#2563eb', density: 'compact' });
const colors = getSemanticColors(theme);
console.log({ surface: colors.surface, padding: spacingPx(2, 'compact') });API and integration
createTheme(mode, options?)creates a theme.getSemanticColors(theme)resolves semantic surface, text, and accent colors.spacingPxandtoNativeTypographyreturn numeric styles for native apps. Use responsive helpers andcssVariablesin web renderers.- Use semantic tokens in components so palette and density changes apply consistently. This package has no React peer.
Read the integration guide for configuration and operational details.
