OhMyUI! - Installation
OhMyUI! is a monorepo containing design tokens and UI components for Angular, React and Flutter. This page explains how to install the packages in your project.
Prerequisites
Before installing, make sure you have:
- Node.js v22 or higher
- npm v10 or higher
- Flutter SDK - only if using Flutter components
Angular
Install the Angular package:
bash
npm install @ohmyopensource/ohmyui-angularImport the component you need directly in your standalone component:
typescript
import { ButtonComponent } from '@ohmyopensource/ohmyui-angular';
@Component({
imports: [ButtonComponent],
template: `<ohmyui-button label="Click me" />`,
})
export class AppComponent {}Add the token stylesheet to your styles.css or angular.json:
css
@import '@ohmyopensource/ohmyui-angular/tokens/variables.css';React
Install the React package:
bash
npm install @ohmyopensource/ohmyui-reactImport the component and the token stylesheet:
tsx
import { Button } from '@ohmyopensource/ohmyui-react';
import '@ohmyopensource/ohmyui-react/tokens/variables.css';
export function App() {
return <Button label="Click me" />;
}Flutter
Add the package to your pubspec.yaml:
yaml
dependencies:
ohmyui_flutter:
git:
url: https://github.com/ohmyopensource/ohmyui
path: packages/ohmyui_flutterThen run:
bash
flutter pub getImport and use the widget:
dart
import 'package:ohmyui_flutter/ohmyui_flutter.dart';
OhMyUIButton(
label: 'Click me',
variant: OhMyUIButtonVariant.primary,
)