# vue-manga-ui > Vue 3 UI controls that react like anime: squash and overshoot on springs, drawn effects (smoke, impact bursts, slashes, splashes) and manga sound-effect lettering on one canvas over the page. Zero runtime dependencies (vue is a peer). Inspired by Sakuga VFX (https://github.com/finktheartist/sakuga-vfx). Install: `npm i vue-manga-ui` Use: `import MangaUi from 'vue-manga-ui'; import 'vue-manga-ui/style.css'; app.use(MangaUi)` then `` etc., or import `{ MButton }` directly. Theme: override `--m-*` CSS variables on :root (`--m-acc`, `--m-pri`, `--m-ink`, `--m-fx-line` ...). Effects switch off under prefers-reduced-motion. Machine-readable API: https://tazaq.github.io/manga-ui/meta.json · MCP server: `npx -p vue-manga-ui vue-manga-ui-mcp` ## MButton `` A button that reacts like an anime impact frame. Press and it squashes flat; let go and it inverts for one frame, a burst goes off behind it, clouds roll off the corners and ドン! lands. Call `done()` to land a check on it. The secondary variant is a small squash and three wedges. ### Props | Prop | Type | Default | Description | |---|---|---|---| | `variant` | `'primary' \| 'secondary'` | `"primary"` | `primary` throws the full impact; `secondary` is the quiet one. | | `disabled` | `boolean` | `false` | Disables the button: no press, no effects. | | `type` | `'button' \| 'submit' \| 'reset'` | `"button"` | Native button type. | Other HTML attributes (`id`, `class`, `aria-*`, `data-*`…) fall through to the component’s element and are type-checked. ### Slots | Slot | Props | Description | |---|---|---| | `default` | `any` | Button label. | ### Exposed (via template ref) | Method | Signature | Description | |---|---|---| | `impact` | `() => void` | The impact a click throws. You can call it yourself. | | `done` | `(hold?: number) => void` | Land a check on the button with a glint. It goes after `hold` seconds (0 keeps it). | ### Example ```vue ``` ## MCheckbox `` A checkbox that slashes: two crescents swing round the box, crystals fly, the tick draws itself and ズザッ lands in dotted letters. A native checkbox underneath keeps forms and keyboard working. ### Props | Prop | Type | Default | Description | |---|---|---|---| | `disabled` | `boolean` | `false` | Disables the checkbox. | | `name` | `string` | — | Form field name. | | `value` | `string` | `"on"` | Value submitted with the form when checked. | | `modelValue` | `boolean` | `false` | Whether the box is ticked. | Other HTML attributes (`id`, `class`, `aria-*`, `data-*`…) fall through to the component’s element and are type-checked. ### Events | Event | Payload | Description | |---|---|---| | `update:modelValue` | `[value: boolean]` | v-model update. | ### Slots | Slot | Props | Description | |---|---|---| | `default` | `any` | Label text. | ### Example ```vue ``` ## MInput `` A text field that kicks up a puff of dust from the caret on every key. Extra attributes go to the native input. ### Props | Prop | Type | Default | Description | |---|---|---|---| | `label` | `string` | `""` | Visible label. | | `placeholder` | `string` | `""` | Hint shown while the field is empty. | | `type` | `'text' \| 'email' \| 'password' \| 'search' \| 'tel' \| 'url' \| 'number'` | `"text"` | Native input type. | | `disabled` | `boolean` | `false` | Disables the field. | | `name` | `string` | — | Form field name. | | `modelValue` | `string` | `""` | Field text. | Other HTML attributes (`id`, `class`, `aria-*`, `data-*`…) fall through to the component’s element and are type-checked. ### Events | Event | Payload | Description | |---|---|---| | `update:modelValue` | `[value: string]` | v-model update. | ### Example ```vue ``` ## MProgress `` A loading bar. A storm cloud rides the leading edge, pebbles lift off the ground and ゴゴゴ rumbles; at the end a burst, ドン! and a check. Emits `done` once each time it reaches 1. ### Props | Prop | Type | Default | Description | |---|---|---|---| | `value` | `number` | `0` | Progress from 0 to 1. | | `label` | `string` | `""` | Visible and accessible label. | Other HTML attributes (`id`, `class`, `aria-*`, `data-*`…) fall through to the component’s element and are type-checked. ### Events | Event | Payload | Description | |---|---|---| | `done` | `[]` | Fired once when the bar reaches 1. | ### Example ```vue ``` ## MRadio `` A radio group. The picked dot springs in with a fan of wedges, two puffs and a hollow ポン. Native radios in a fieldset underneath: arrow keys, forms and screen readers work as usual. ### Props | Prop | Type | Default | Description | |---|---|---|---| | `options` * | `RadioOption[]` | — | The choices. | | `label` | `string` | `""` | Group legend. | | `disabled` | `boolean` | `false` | Disables the whole group. | | `name` | `string` | — | Form field name; generated when omitted. | | `modelValue` | `string` | `""` | Value of the picked option. | Other HTML attributes (`id`, `class`, `aria-*`, `data-*`…) fall through to the component’s element and are type-checked. ### Events | Event | Payload | Description | |---|---|---| | `update:modelValue` | `[value: string]` | v-model update. | ### Example ```vue ``` ## MRating `` Stars that pop in one after another, with wedges and a hollow ポン on the last; full marks get a burst. Native radios underneath: arrow keys and forms work. ### Props | Prop | Type | Default | Description | |---|---|---|---| | `max` | `number` | `5` | Number of stars. | | `label` | `string` | `""` | Group legend. | | `disabled` | `boolean` | `false` | Disables the rating. | | `name` | `string` | — | Form field name; generated when omitted. | | `modelValue` | `number` | `0` | Stars given, 0 to `max`. | Other HTML attributes (`id`, `class`, `aria-*`, `data-*`…) fall through to the component’s element and are type-checked. ### Events | Event | Payload | Description | |---|---|---| | `update:modelValue` | `[value: number]` | v-model update. | ### Example ```vue ``` ## MSlider `` A range slider. The thumb stretches into a teardrop and lags on a spring; drag fast and cumulus rolls up behind it, let go and a crescent flies on ahead. A native range input on top keeps pointer, keyboard and forms native. ### Props | Prop | Type | Default | Description | |---|---|---|---| | `min` | `number` | `0` | Lowest value. | | `max` | `number` | `100` | Highest value. | | `step` | `number` | `1` | Distance between allowed values. | | `label` | `string` | `""` | Visible label. | | `unit` | `string` | `""` | Shown after the value, e.g. `%`. | | `disabled` | `boolean` | `false` | Disables the slider. | | `name` | `string` | — | Form field name. | | `modelValue` | `number` | `0` | Current value. | Other HTML attributes (`id`, `class`, `aria-*`, `data-*`…) fall through to the component’s element and are type-checked. ### Events | Event | Payload | Description | |---|---|---| | `update:modelValue` | `[value: number]` | v-model update. | ### Example ```vue ``` ## MTabs `` Tabs. The raised tab slides to the one you pick, stretching, and lands with wedges and a puff. Follows the WAI-ARIA tabs pattern: arrow keys, Home and End move and select. The default slot is the panel. ### Props | Prop | Type | Default | Description | |---|---|---|---| | `tabs` * | `string[]` | — | Tab labels. | | `label` | `string` | `""` | Accessible name of the tab list. | | `modelValue` | `number` | `0` | Index of the selected tab. | Other HTML attributes (`id`, `class`, `aria-*`, `data-*`…) fall through to the component’s element and are type-checked. ### Events | Event | Payload | Description | |---|---|---| | `update:modelValue` | `[value: number]` | v-model update. | ### Slots | Slot | Props | Description | |---|---|---| | `default` | `{ index: number; tab: string; }` | The panel for the selected tab. | ### Example ```vue ``` ## MToast `` A notification that streaks in as a smear, lands in dust with ズザッ, wobbles and leaves by shrinking. Place it where toasts should appear and call `show('Saved')`. It is a polite live region. ### Props | Prop | Type | Default | Description | |---|---|---|---| | `duration` | `number` | `2.6` | Seconds the toast stays; 0 keeps it until `hide()`. | Other HTML attributes (`id`, `class`, `aria-*`, `data-*`…) fall through to the component’s element and are type-checked. ### Exposed (via template ref) | Method | Signature | Description | |---|---|---| | `show` | `(text: string) => void` | Show `text`. Showing again while open replaces the text and restarts the timer. | | `hide` | `() => void` | Shrink away now. | ### Example ```vue ``` ## MToggle `` A switch. The knob smears across, slams into the end and throws up a splash, and the track floods and settles. Built on a native checkbox with `role="switch"`, so it works in forms and with the keyboard. ### Props | Prop | Type | Default | Description | |---|---|---|---| | `label` | `string` | `""` | Visible label. | | `disabled` | `boolean` | `false` | Disables the toggle. | | `name` | `string` | — | Form field name. | | `modelValue` | `boolean` | `false` | Whether the switch is on. | Other HTML attributes (`id`, `class`, `aria-*`, `data-*`…) fall through to the component’s element and are type-checked. ### Events | Event | Payload | Description | |---|---|---| | `update:modelValue` | `[value: boolean]` | v-model update. | ### Example ```vue ``` ## MTooltip `` A help button whose hint springs out like a speech bubble, with puffs and a hollow カチッ. Opens on hover, focus and tap; Escape closes it. The hint is linked with `aria-describedby`. ### Props | Prop | Type | Default | Description | |---|---|---|---| | `text` * | `string` | — | The hint. | | `label` | `string` | `"Help"` | Accessible name of the button. | Other HTML attributes (`id`, `class`, `aria-*`, `data-*`…) fall through to the component’s element and are type-checked. ### Slots | Slot | Props | Description | |---|---|---| | `default` | `any` | Button content; a question mark by default. | ### Example ```vue ```