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

@orby/style

v0.0.2

Published

Orby is a small experiment of functional components based on virtual-dom.

Readme

@orby/style

Create stylized components with a minimalist syntax, @ orby / style is compatible with Orby,Preact,Hyperapp and React

import {h,render} from "@orby/core";
import create from "@orby/style";

let styled = create(h);

let Spinner = styled("div")(`
   :global(body)
       background:black
      
   :host
       width:20px
       height:20px
       border:radius
       border:1px solid white
       border-bottom:none
       animation:rotate 1s alternate infinite

   @keyframes rotate
       0%
           transform:rotate(0deg)
       100%
           transform:rotate(360deg)
`);

render(
   <Spinner>title</Spinner>,
   document.body
)

Scope :host

By default @orby/style limits the context only to the class generated for the component, anyway you can escape from this context by using :global(<selector>)

let Form = styled("form")(`
   :host
       display: flex
       flex-flow: column wrap

   input
       width: 320px
       height: 40px

   button
       padding: .5rem 1.5rem
       border-radius: 50px

   input,button
       background: transparent
       border: 1px solid white

`)

<Form>
   <input placeholder="input"/>
   <button>Send</button>
</Form>

:host allows to point to the container, both input and button will own style being only inside the container component <Form/>

This can also have interaction based on some selector

let Button = styled("button")(`
   :host(.success)
       background: teal

   :host(.danger)
       background: gold

   :host(.error)
       background: tomato
`)

<Button class="success"/>
<Button class="danger"/>
<Button class="error"/>

Not only is it limited to selectors by class, you can use any type of selector :host(:not(.success),:not(.danger))

keyframes

Keyframes also have only one scope inside the container

let Spinner = styled("div")(`
   :host
       animation:rotate 1s alternate infinite

   @keyframes rotate
       0%
           transform:rotate(0deg)
       100%
           transform:rotate(360deg)
`);

scope :global

:global allows to escape with the associated selector of the host range, for example if we wanted to add a style on the body tag we can do the following

let Page = styled("div")(`
   :global(body)
       background: black
`);