@smoothie-framework/ui-react
v0.0.2
Published
Smoothie UI React adapter baseline on ui-core and ui-styles
Downloads
231
Readme
@smoothie-framework/ui-react
React adapter baseline for Smoothie UI contracts.
This package proves a React-first adapter path that depends on
@smoothie-framework/ui-core and @smoothie-framework/ui-styles without using
the @smoothie-framework/ui runtime.
Usage:
import '@smoothie-framework/ui-styles/styles/components';
import { Button, SmoothieThemeProvider, Stack, Text, smoothieUiStylesPlugin } from '@smoothie-framework/ui-react';
// vite.config.ts
// export default defineConfig({
// plugins: [smoothieUiStylesPlugin()],
// });
export function App() {
return (
<SmoothieThemeProvider activeTheme="dark">
<Stack gap="md">
<Text size="lg" weight="bold">Hello from React</Text>
<Button variant="primary">Ship it</Button>
</Stack>
</SmoothieThemeProvider>
);
}SmoothieThemeProvider injects theme variable CSS by default. Import the shared
components stylesheet for base recipe-backed component classes, and use the
Vite plugin so utility-backed adapter classes such as stack spacing/alignment
are generated from the shared ui-styles pipeline.
