@first-apps/mimi-ui
v1.0.8
Published
Reusable web components across any JavaScript frameworks
Maintainers
Readme
Install
npm install @first-apps/mimi-uiUsage
@first-apps/mimi-ui exposes typed framework entrypoints. Pick the subpath that
matches your stack — every entrypoint is a regular import, no bundler
plugin needed.
Detailed Usage Examples
Four entrypoints ship: the vanilla web-components (
@first-apps/mimi-ui), plus React, Vue, and Angular wrappers. For the raw custom elements without a wrapper, see Plain usage.
Plain HTML
<script type="module">
import '@first-apps/mimi-ui'; // registers <m-button>
</script>
<m-button variant="primary" size="md">Save changes</m-button>React 18+
import { MButton } from '@first-apps/mimi-ui/react';
export function SaveButton() {
const onClick = () => {
// …
};
return (
<MButton variant="primary" onClick={onClick}>
Save
</MButton>
);
}onClick is the native click. Use onMButtonClick for the component's own
event, which carries a typed payload:
import { MButton, type MButtonClickDetail } from '@first-apps/mimi-ui/react';
<MButton
variant="primary"
onMButtonClick={(e: CustomEvent<MButtonClickDetail>) => {
// e.detail.source → the <m-button> element
}}
/>;Vue 3.4+
<script setup lang="ts">
import { MButton } from '@first-apps/mimi-ui/vue';
function onSave() {
// …
}
</script>
<template>
<MButton variant="primary" @click="onSave">Save</MButton>
</template>The icon slot is forwarded too:
<MButton variant="primary">
<template #icon><span aria-hidden="true">★</span></template>
Add to favorites
</MButton>Angular 18+
import { Component, CUSTOM_ELEMENTS_SCHEMA } from '@angular/core';
import '@first-apps/mimi-ui';
@Component({
selector: 'app-save',
standalone: true,
schemas: [CUSTOM_ELEMENTS_SCHEMA],
template: `<m-button variant="primary" (click)="onSave()">Save</m-button>`,
})
export class SaveComponent {
onSave() {
// …
}
}MIT licensed © 2026 mimi-ui contributors · GitHub repo →
