No description
  • TypeScript 97.3%
  • CSS 2.1%
  • JavaScript 0.5%
Find a file
Repository files (latest commit first)
Filename Latest commit message Latest commit date
Alois 63ae559823
All checks were successful
/ deploy-and-package (push) Successful in 1m5s
(feat): more improvements
(feat): bump version
2026-07-26 17:10:35 +02:00
.forgejo/workflows (fix): workflow 2026-07-26 15:35:59 +02:00
apps/showcase (feat): more improvements 2026-07-26 17:10:35 +02:00
src (feat): more improvements 2026-07-26 17:10:35 +02:00
.gitignore Migrate tensamin/ui to methanium/ui 2026-07-25 13:09:54 +02:00
components.json Migrate tensamin/ui to methanium/ui 2026-07-25 13:09:54 +02:00
LICENSE Migrate tensamin/ui to methanium/ui 2026-07-25 13:09:54 +02:00
package.json (feat): more improvements 2026-07-26 17:10:35 +02:00
pnpm-lock.yaml (feat): initial stuff 2026-07-26 02:56:07 +02:00
pnpm-workspace.yaml (feat): initial stuff 2026-07-26 02:56:07 +02:00
README.md (feat): big updates, added og tensamin theme 2026-07-26 15:05:47 +02:00
tsconfig.build.json Migrate tensamin/ui to methanium/ui 2026-07-25 13:09:54 +02:00
tsconfig.json Migrate tensamin/ui to methanium/ui 2026-07-25 13:09:54 +02:00

Methanium UI

pnpm install https://git.methanium.net/methanium/ui/releases/download/latest/methanium-ui.tgz

Import the stylesheet once, then add the provider at the application root:

import "@methanium/ui/index.css";
import { ThemeProvider } from "@methanium/ui";

<ThemeProvider>{children}</ThemeProvider>;

App Default

Vite applications can choose their initial parent theme at build time:

import { methaniumUi } from "@methanium/ui/vite";

export default defineConfig({
  plugins: [methaniumUi({ defaultThemeId: "tensamin" })],
});

The built-in parent themes are tensamin, og-tensamin, methanium, and secret. Without the plugin or a provider override, the neutral base theme is used. Public Sans is bundled as the default typeface; users can switch to their platform's system font in the customizer.

Custom Themes

Pass a typed manifest to ThemeProvider to add themes. Presets are ordinary CSS and remain fully editable after selection.

import {
  BUILT_IN_THEMES,
  DEFAULT_THEME_DESIGN,
  defineThemes,
} from "@methanium/ui";

export const themes = defineThemes([
  ...BUILT_IN_THEMES,
  {
    id: "my-theme",
    title: "My Theme",
    logo: "/themes/my-logo.svg",
    defaultValues: {
      borderRadius: 0.5,
      design: { ...DEFAULT_THEME_DESIGN, density: 0.95 },
    },
    css: `:root[data-theme="my-theme"] { --primary: #ff4f91; }`,
  },
]);

Use <ThemeCustomizer /> for all theme editing. <ThemeSelector /> is its focused parent-theme selection control.

Onboarding

Every OnboardingStep requires a title; the flow owns title rendering and focus. <ThemeOnboardingPage /> applies choices immediately and prevents continuing until the user explicitly selects a theme.