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

@onekeyfe/react-native-perp-depth-bar

v3.0.180

Published

Native order-book depth bars and bid/ask ratio views for OneKey

Readme

@onekeyfe/react-native-perp-depth-bar

PerpDepthBar view for React Native

Native iOS and Android views for an order-book depth column and a bid/ask ratio track. Each view owns native drawing and animation; the application provides formatted prices, sizes and percentages.

Installation

yarn add @onekeyfe/react-native-perp-depth-bar react-native-nitro-modules

Usage

import { PerpDepthBarsView, PerpSideRatioView } from '@onekeyfe/react-native-perp-depth-bar';

// ...

<PerpDepthBarsView
  style={{ width: 220, height: 120 }}
  percents={[90, 60, 35]}
  rowHeight={28}
  rowMarginTop={4}
  barInset={2}
  color="rgba(255, 88, 88, 0.18)"
  origin="left"
  reducedMotion={false}
  epoch={0}
  prices={['4100.1', '4099.8', '4099.5']}
  sizes={['1.2', '0.8', '2.4']}
  priceColor="#ff6b6b"
  sizeColor="#8b949e"
  priceFontSize={13}
  sizeFontSize={13}
  textInset={8}
  placeholderText="--"
  placeholderRows={3}
/>;

<PerpSideRatioView
  style={{ width: 220, height: 4 }}
  bidPercentage={56}
  askPercentage={44}
  longColor="#16a34a"
  shortColor="#dc2626"
  segmentHeight={4}
  cornerRadius={2}
  gap={2}
  reducedMotion={false}
/>;

Updates and interaction

Install the application's iOS pods and rebuild the native application after adding these Nitro views. Keep price/size arrays aligned with the depth rows, and provide enough height for rowHeight and rowMarginTop.

For frequent updates, use setDepth(ArrayBuffer) with packed Float32 percentages and setText(prices, sizes) on the depth view's Nitro reference. The first imperative call switches that data channel into imperative mode; subsequent updates to its initial props are ignored. Likewise, the ratio view exposes setRatio(bidPercentage, askPercentage) instead of high-frequency ratio props.

onRowPress returns the zero-based depth row index. epoch lets callers snap to a new depth dataset rather than animate across a coin or tick-size change. reducedMotion disables animation. Empty depth/text data can use the configured placeholder text and row count.

The interfaces are defined in src/PerpDepthBars.nitro.ts and src/PerpSideRatio.nitro.ts.

Contributing

Follow the repository's native development workflow.

License

MIT


Made with create-react-native-library