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

@react-cerberus/web

v0.1.0

Published

The goal of this framework is to provide a set of UI elements that guarantee consistent design and behavior across different platforms, such as web, iOS, and Android.

Downloads

91

Readme

react-cerberus

The goal of this framework is to provide a set of UI elements that guarantee consistent design and behavior across different platforms, such as web, iOS, and Android.

If you want to see the elements, please visit the web version storybook.

How to use

Installation

# web platform
> npm install @react-cerberus/elements @react-cerberus/web

# React Native platform
> npm install @react-cerberus/elements @react-cerberus/native

Usage

Run the initializer in your app's entry point.

Web platform:

import { initReactCereberusWeb } from '@react-cerberus/web';

initReactCereberusWeb();

React Native platform:

import { initReactCereberusNative } from '@react-cerberus/native';

initReactCereberusNative();

Why do we need this?

A company or an organization with multiple products for mutiple platforms may want to have a unified design system across all of them. However, vanilla HTML and React Native elements look different and behave differently, which makes it hard to achieve a consistent design and behavior. For example, button elements in HTML and TouchableOpacity elements in React Native have different style.

(a screenshot of a button in HTML and a TouchableOpacity in React Native)

This framework provides a set of UI elements that look and behave the same across different platforms.

Why can't we just use cross-platform UI libraries such as react-native-for-web?

It is possible. However, such libaries depends on a certain react framework, which restricts the flexibility of product development. If an UI library is built on top of react-native-for-web, it is not possible to develop a service with web-based react framework such as Next.js.

Development

Install packages

npm install --legacy-peer-deps

We need to use --legacy-peer-deps because there are conflicts between nx libraries.

How to publish

From the documentation:

  1. Run nx release --skip-publish locally. This will create a commit with the version and changelog updates, then create a tag for the new version.
  2. Push the changes (including the new tag) to the remote repository with git push && git push --tags.
  3. The CI workflow will automatically trigger and publish the packages to the npm registry.

Running Storybooks

# web platform
> npx nx storybook web-storybook

# native platform (it will start an Expo app)
> npx nx start native-storybook

If you update apps/native-storybook/.storybook files, you would want to apply changes by building the files. Please run the following command:

> npx nx storybook-generate native-storybook