@libraz/mejiro-react
v0.5.0
Published
React components and hooks for mejiro — vertical text rendering, EPUB reader, and editor
Maintainers
Readme
@libraz/mejiro-react
React components and hooks for mejiro — vertical text rendering plus full-featured MejiroReader / MejiroEditor / MejiroManuscriptEditor components.
Install
npm install @libraz/mejiro @libraz/mejiro-react react
npm install -D @types/reactPeer dependency: react >= 18.
Quick start
import '@libraz/mejiro/render/mejiro-fonts.css'; // optional webfonts
import { MejiroReader } from '@libraz/mejiro-react';
export default function App() {
return <MejiroReader epubUrl="/book.epub" />;
}MejiroReader fills its container, so the root chain needs an explicit height:
html, body, #root { height: 100%; margin: 0; }Templates
Copy-paste-ready starters live under examples/:
npx degit libraz/mejiro/examples/react my-reader
npx degit libraz/mejiro/examples/react-shelf my-library
npx degit libraz/mejiro/examples/react-editor my-editor
npx degit libraz/mejiro/examples/react-manuscript my-authorDocumentation
- React / Vue guide — components, hooks, props, theming, SSR
- Project README
- 日本語ドキュメント: docs/ja/08-react-and-vue.md
