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

coral-system

v1.0.6

Published

a lightweight style system with react ui primitives

Downloads

80

Readme

coral-system

一个轻量级的样式系统和 React 布局原子组件库。

文档地址:https://wwsun.github.io/coral-system/

Features

  • [x] 原子化 css 生成
  • [x] 支持 css in js
  • [x] 支持 css variables
  • [x] 支持 prefix 自定义
  • [x] 提供标准化的 Design Token 支持
  • [x] css 传入自定义属性 css={css}
  • [x] css 逻辑的动态表达 css=[css1, css2]
  • [x] Coral Factory: coral('input', css``, { prefix: '' });
  • [ ] 提供 FusionDesign 主题的导入支持
  • [ ] 提供 Antd 主题的导入支持
  • [ ] 响应式支持
  • [ ] 常用伪类支持 _hover...

Usage

import { Box, SystemProvider } from 'coral-system';

function App() {
  return (
    <SystemProvider prefix="--coral" theme={YOUR_THEME}>
      <Box>hello</Box>
    </SystemProvider>
  );
}

Factory

使用 coral 方法可以创建具备 style props 的组件。

import { coral, css } from 'coral-system';

const Section = coral('section', css`
  /* your initial style */
`);

function App() {
  return <Section bg="brand">hello</Section>;
}

prefix 优先级

props prefix > theme context prefix > option prefix

Development

# install
$ yarn

# start
$ yarn start

Release

# publish
$ yarn release

# deploy to github pages
$ yarn story:deploy