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 🙏

© 2024 – Pkg Stats / Ryan Hefner

rubi-text

v1.0.1

Published

A concept component to improve pronunciation descriptions.

Downloads

1

Readme

Rubi

Rubi characters are small superscript texts placed above or to the right of normal text. These characters are common in East Asian writings and serve a purpose in adding an extra pronunciation guide for unfamiliar readers. After seeing a twitter post by @mabelandtee, I developed a ReactJS concept component to deliver a similar result as Rubi characters, but for English.

Check out the Demo

For more information on Rubi Characters, check out this Wiki article

Example Render

Getting Started

Via NPM:

npm install rubi-text --save

Example Code

import Rubi from 'rubi-text'

const App = () => <Rubi text="Kernel">Colonel</Rubi>

export default App

Properties

| Prop | type | default | description | required | |--------------|---------|-----------|-------------------------------------------|-----------| | text | string | none | Your rubi text above the normal text | Yes | | children | string | none | Your normal text | Yes | | size | string | "12px" | Font size for your rubi text | No | | offsetX | number | 0 | Offset rubi text on X-axis | No | | offsetY | number | 0 | Offset rubi text on Y-axis | No | | color | string | "initial" | Color of your rubi text | No | | align | string | "center" | Aligns rubi text | No | | justify | boolean | false | Justify Rubi text to width of normal text | No | | lowerSpacing | boolean | false | Justify normal text to width of Rubi text | No | | lowerCenter | boolean | false | Centers normal text to width of Rubi text | No | | attachAfter | string | none | Add string after each char in normal text | No |

Be sure to check out the example folder to see these properties in action.

FAQ

Will this support other writing systems?

Not sure. I have some experience in multilingual websites, but I'm open to contributions.

Why the name "Rubi"? It's really similar to the "Ruby" programming language.

No relation. "Ruby" or "Rubi" is just what it's called. I could have gone for "Ruby" but yeah, I'm pretty certain that's been taken.

Why did you build this?

I liked the concept and figured myself and other people would find it useful.

HTML5 already exists?

It does! And we actually use that here for semantic correctness. This component essentially makes it look better to write in your code. We also add several additional properties to improve readability.

Do you profit from this?

Nope. Would appreciate a follow, though. Twitter | Twitch

My Rubi characters are overlapping?

The Rubi text will require that you have a line-height set for your content. I've found that line-height: 32px works best at minimum.

Does this support mobile?

It does.

This looks kind of weird?

Of course. This isn't a standard in English writing systems. But it certainly makes it more interesting.

Can I contribute to this?

Yep. Make that pull request.

License

MIT © Technopathic