Skip to content

Installation

Enable the module, set up the host and start with your first component.

Before you start

You need a Meeko application, Node.js 24 or later and a Meeko version in the range >=1.8 <2. UI belongs to the Meeko ecosystem and ships as a separate package.

Install the package

Terminal sh
pnpm add @meekojs/ui

Register the module

Register it by name: its options go under the ui key, typed without importing anything. Components are registered with the UI prefix.

meeko.config.ts ts
import { defineMeekoConfig } from '@meekojs/meeko/framework'

export default defineMeekoConfig({
  modules: ['@meekojs/ui'],
  theme: { default: 'dark' },
})

The module registers its CSS and Vite processes it with your project's PostCSS. You do not need to import a stylesheet by hand or add another processor.

Add UIApp

Wrap your application to host the modals opened with useModal(). The module's plugin creates the manager and UIApp renders its stack.

app/app.meeko meeko
<!-- app/app.meeko -->
<template>
  <UIApp>
    <MeekoOutlet />
  </UIApp>
</template>

Use a component

meeko
<script lang="ts">
  const count = signal(0)
</script>

<template>
<UIButton on:click="() => count.value++">Save changes</UIButton>
<UIButton variant="outline">Cancel</UIButton>
<UIButton size="sm" disabled>Unavailable</UIButton>
<p role="status">Changes: {count.value}</p>
</template>
Signals, macros and UI components are discovered in your application. The types you need explicitly are imported from the package's public exports.

Continue with theming and customization or explore all components.

Was this page helpful?

Add a comment

It is sent when you choose “Yes” or “No”. Only the page, your answer and the comment are stored: no cookies and no personal data.

0 of 2000 characters