npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@project161/yang-furigana

v0.4.1

Published

An easy way to use <ruby> tags in Angular

Readme

yang-furigana

yang-furigana is a quick way to use the <ruby> tag in an Angular template. Furigana is a japanese word that indicates that little characters you might see sometimes above Kanji (chinese ideograph) that indicates how to read that particular kanji.

To achieve this, you'd use the <ruby> tag in html: <ruby>明日<rp>(</rp><rt>あした</rt><rp>)</rp></ruby>

But you can achieve it with a simpler syntax: <span yangFurigana="あした">明日</span>

Which one do you prefer? You might wanna check the Wikipedia page to learn more about furigana in general. Also you can use it with the International Phonetic Alphabet. It's up to you.

How it looks

Here's a demo with several examples. Give it a look, I'm sure you're gonna like it!

How to include in your project

The easiest part: use NPM to add it in your project. Go to your app folder and type: npm install @project161/furigana --save-dev

Add it will be added to project's package.json dependencies.

Tip: (Add a -g to save it globally)

How to use it

First of all, make sure you add the yangFuriganaModule to the list of import in the module containing the templates where you're gonna use the directive.

import { YangFuriganaModule } from "@project161/yang-furigana";
...
@NgModule({
  imports: [
    ...
    yangFuriganaModule <-- Add this and you're good to go!
    ...
  ],
  declarations: [...],
  ...
})
export class MyModule {}

After that, you're ready to use it in any template file that includes only text using the attribute yangFurigana or yang-furigana. <span yangFurigana="あした">明日</span>

You can use it in every tag, even a generic <div> but please mind that if this tag have other tags inside, the furigana won't be rendered.
Mind you can separate a single sentence using multiple span elements:

<span yangFurigana="はたら">働<span>
<span>きます</span>

Add some style to it

Adding style is quite easy. You can add it straight to the span element, along with the yangFurigana attribute: <span yangFurigana="あした" class="some-class>明日</span>

In this way, the class will affect the entire HTML, which mean it will work for the main text of the element and the text above. In case you want assign some style on the furigana text only, you may add to the span element the attributes yangFuriganaClass and/or yangFuriganaStyle. You can easily guess how they work:

<span yangFurigana="あした" yangFuriganaClass="some-class>明日</span>

<span yangFurigana="あした" yangFuriganaStyle="color:blue;">明日</span>

The syntax is exactly as you're adding a normal class or a regular style attribute in an HTML template of any kind.

(Written with StackEdit - it's actually pretty cool)