Skip to content

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:


Angular

Install the Angular package:

bash
npm install @ohmyopensource/ohmyui-angular

Import 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-react

Import 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_flutter

Then run:

bash
flutter pub get

Import and use the widget:

dart
import 'package:ohmyui_flutter/ohmyui_flutter.dart';

OhMyUIButton(
  label: 'Click me',
  variant: OhMyUIButtonVariant.primary,
)

Next steps

Released under the AGPL-3.0 License.