nhg-ruby
Web component to display japanese text with furigana.
Installation
npm install nhg-ruby --save
Then, import nhg-ruby into your element:
;
or in an html file:
Usage
In your LitElement class:
static { return {};} { super;} { return html` `;}
Notes
-
furigana
list can be separated by both japanese or romanji comma, but without spaces after the comma. -
Text can also be displayed from top to bottom and right to left by setting
writing-mode
CSS property tovertical-rl
tonhg-ruby
or any of its parents.