@libraz/mejiro-vue
@libraz/mejiro-vue
Vue 3 components and composables for mejiro. Render vertical text yourself with the composables, or drop in the MejiroReader / MejiroEditor / MejiroManuscriptEditor components, with MejiroShelf and MejiroToc for library and table-of-contents screens.
Install
npm install @libraz/mejiro @libraz/mejiro-vue vue
Peer dependency: vue >= 3.3.
Quick start
<script setup lang="ts">
import '@libraz/mejiro/render/mejiro-fonts.css'; // optional webfonts
import { MejiroReader } from '@libraz/mejiro-vue';
</script>
<template>
<MejiroReader epub-url="/book.epub" />
</template>
MejiroReader fills its container, so the root chain needs an explicit height:
html, body, #app { height: 100%; margin: 0; }
To embed in normal page flow instead (a blog post, a docs page) with no height
math, use fit="width" — the reader self-sizes its height from its width:
<MejiroReader epub-url="/book.epub" fit="width" />
Embedding inside a framework with an unlayered global CSS reset (VitePress, Tailwind preflight, normalize.css)? See the cascade-layers note so host resets don't clobber the reader chrome.
Templates
Copy-paste-ready starters live under examples/:
npx degit libraz/mejiro/examples/vue my-reader
npx degit libraz/mejiro/examples/vue-shelf my-library
npx degit libraz/mejiro/examples/vue-editor my-editor
npx degit libraz/mejiro/examples/vue-manuscript my-author
npx degit libraz/mejiro/examples/vue-embed my-embed
npx degit libraz/mejiro/examples/vue-headless my-headless
Templates are workspace members, so the copied package.json still carries
workspace:* versions. Each starter's own README.md carries the exact
one-liner that rewrites them to the matching published release — run it before
npm install.
Documentation
- React / Vue guide — components, composables, props, theming
- API reference — every component prop and composable
- SSR first paint — a
renderEpubStaticfallback until the reader hydrates - Project README
- 日本語ドキュメント: docs/ja/08-react-and-vue.md
License
Related Packages
Version History
| Version | Released | Vue | License |
|---|---|---|---|
| 0.9.2 | >=3.3 | Apache-2.0 | |
| 0.9.1 | >=3.3 | Apache-2.0 | |
| 0.9.0 | >=3.3 | Apache-2.0 | |
| 0.8.0 | >=3.3 | Apache-2.0 | |
| 0.7.0 | >=3.3 | Apache-2.0 | |
| 0.6.0 | >=3.3 | Apache-2.0 | |
| 0.5.0 | >=3.3 | Apache-2.0 | |
| 0.4.0 | >=3.3 | Apache-2.0 | |
| 0.3.0 | >=3.3 | Apache-2.0 | |
| 0.2.0 | >=3.3 | Apache-2.0 | |
| 0.1.0 | >=3.3 | Apache-2.0 |