<img src="https://cdn.jsdelivr.net/npm/moey-ui@0.2.0/brand/moey-icon.svg" width="64" height="64" alt="Moey logo">

# Moey

A clean, mobile-first front-end framework for admin dashboards, productivity apps and websites — plain HTML, one stylesheet and one script. No dependencies, no build step.

Moey takes the best ideas from the popular frameworks (Tailwind, Bulma, Bootstrap, shadcn, DaisyUI, Tamagui and others) and puts them into one consistent, carefully tested toolkit: cascade layers, OKLCH colors, light and dark mode, right-to-left, and a variable icon font.

## Why Moey

- **Mobile first, for real.** Every page works down to 280px wide with no sideways scrolling. Menus and dialogs become bottom sheets on phones, and sheets sit right on the on-screen keyboard. Fields never zoom the page.
- **Flat and calm.** Surfaces are separated by color, not borders; only floating things get a shadow. App density: 15px text, compact controls.
- **Colors by name.** 14 colors × 12 shades, and six strengths for every component (`btn btn-green btn-vivid`). Paint any area (`theme-indigo-deep`) and everything inside stays readable — thousands of contrast checks pass WCAG AA in light and dark mode.
- **Your brand in one attribute.** `<html data-mo-brand="blue">` — black ("tuxedo") by default.
- **Short utilities, phone first.** `flex items-center gap-4 p-4 md:flex-row`, container queries (`@md:`), and a spacing scale that is simply the number × 4px.
- **Feels like an app on a phone.** A tab bar, swipe actions on rows, pull to refresh, drag to reorder, a lightbox you swipe and pinch, a chat that sits on the keyboard.
- **Built for work apps.** Data tables you edit in place (and scroll through 10,000 rows), charts, Kanban boards, an inbox split view, calendars, keyboard shortcuts and first-run tours.
- **Accessible by default.** Keyboard, focus, screen-reader roles and announcements, reduced motion and RTL are built in.

## Install

From a CDN (nothing to download):

```html
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/moey-ui@0.2.0/dist/moey.min.css">
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/moey-icons@1.0.0/dist/moey-icons.min.css">
<script src="https://cdn.jsdelivr.net/npm/moey-ui@0.2.0/dist/moey.min.js" defer></script>
```

Or from npm — `npm i moey-ui moey-icons` — and link the same files from `node_modules/moey-ui/dist/` (or copy `dist/` into your site). Keep `dist/fonts/` next to the stylesheet: Inter and JetBrains Mono are self-hosted (no Google Fonts, no outside requests), and browsers only download the language subsets a page uses.

Moey Icons are a separate package (`moey-icons`, [icons.nakedtuxedo.com](https://icons.nakedtuxedo.com)); Moey works with any icon set, but its docs and examples use them.

## What's inside

The docs have one page per piece, with live examples: run a local server and open `docs/`.

- **Getting started** — installation, examples (dashboard, landing page, settings, sign in, navbar), accessibility
- **Customize** — colors, themes and strengths, light / dark mode, shapes, scrollbars, options and the brand switch, component variables, transitions and entrance animations, RTL, smaller custom builds
- **Layout** — breakpoints, containers, 12-column grid, CSS grid, masonry, app shell, sidebar, z-index
- **Content** — reboot, typography, images (light / dark pictures), audio & video player, click-to-load embeds, tables, prose
- **Forms** — fields, inputs, Moey dropdowns for every select, checkboxes, switches, range, color picker, input groups, floating labels, chips, combobox, datepicker, time picker (and date + time), rich text (with the Mob editor), OTP, password strength, form layout, validation
- **Components** — accordion, alert, avatar, badge, bottom sheet, breadcrumb, button, button group, card, carousel, dialog, drawer, list group, menu, nav, nav overflow, navbar (with phone layouts), tab bar, pagination, popover, progress, scrollspy, spinner, tabs, toasts, toggler, tooltip
- **Moey extras** — stat, segmented control, empty state, description list, timeline, skeleton, kbd, command palette, data table (editing, very long tables, expandable / tree / grouped rows), charts, Kanban, split view, calendar, swipe actions, pull to refresh, sortable, filter & sort, infinite scroll, lightbox, chat, keyboard shortcuts, tour, tree view, dropzone, rating, tag input, notification center, adapt, confirm dialogs
- **Sections** — hero, features, pricing, testimonials, call to action, logo cloud, marquee, stats, FAQ, footer
- **Helpers** — stacks, stretched link, text truncation, focus ring, hover lift, hover reveal, icon link, fixed / sticky, visually hidden
- **Utilities** — display, flex, grid, alignment, gap, spacing, sizing, text, colors, backgrounds, borders, effects, position, overflow, aspect ratio, interactions, container queries

## Develop

Only Node.js is needed.

```sh
node build.mjs                 # dist/ + the docs pages
node build.mjs --breakpoints=md,lg --out=my-moey    # a smaller custom build
node build.mjs --without=carousel,datatable --out=my-moey
```

The docs use clean links (`docs/button`), so open them through a local web server (any — the repo includes an `.htaccess` for Apache).

```
moey/
├── build.mjs              build + settings (palette, brand, breakpoints, spacing)
├── src/css/               one file per part, bundled into cascade layers
├── src/js/moey.js         every behavior, one file
├── dist/                  built files (don't edit)
├── docs/src/pages/        one page per piece (docs/*.html are generated)
└── examples/              whole example pages
```

## Credits

Released under the [MIT License](LICENSE).

Bundled fonts: [Inter](https://rsms.me/inter/) and [JetBrains Mono](https://www.jetbrains.com/lp/mono/), both under the SIL Open Font License 1.1 (`dist/fonts/*-OFL.txt`). Moey Icons, a separate package, have their own licenses (Lucide ISC, Tabler Icons and Bootstrap Icons MIT).
