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

react-native-kundli-chart

v1.0.0

Published

A fully-typed, dependency-light North Indian (diamond) Vedic astrology / Lagna Kundli chart for React Native, rendered with react-native-svg. Ships the chart, a legend bottom sheet, and a fullscreen modal.

Readme

react-native-kundli-chart

npm version CI license: MIT types: TypeScript

A fully-typed, dependency-light North Indian (diamond) Vedic astrology chart for React Native, drawn as crisp SVG at any size. Ships three composable pieces:

  • NorthIndianChart — the diamond Lagna/Kundli chart.
  • ChartLegendBottomSheet — a themeable legend (planets, signs, dignity colours).
  • FullscreenChartModal — a full-screen, pinch-to-zoom presentation with header + legend.

Everything is themeable and localisable. No hard-coded strings, colours, or sizes. No runtime dependency beyond react, react-native, and react-native-svg.

Preview

Images are generated from the library's own layout with npm run build && npm run screenshots (see scripts/generate-screenshots.js). The legend sheet and fullscreen modal are best seen live — run the example app.


Install

npm install react-native-kundli-chart react-native-svg
# or
yarn add react-native-kundli-chart react-native-svg

react-native-svg is a peer dependency — install and link it per its own instructions (autolinking on RN ≥ 0.60).

Quick start

import { NorthIndianChart, type PlanetPlacement } from 'react-native-kundli-chart';

const planets: PlanetPlacement[] = [
  { id: 'sun', rashi: 5, dignity: 'ownSign' },
  { id: 'moon', rashi: 2, dignity: 'exalted' },
  { id: 'saturn', rashi: 1, isRetrograde: true },
  // ...
];

<NorthIndianChart ascendantRashi={5 /* Leo */} planets={planets} size={320} />;

Indexing convention

  • RashiNumber is 1..12 where 1 = Aries (Mesha)12 = Pisces (Meena).
  • HouseNumber is 1..12. House 1 is the top-centre diamond and always holds ascendantRashi.
  • The chart is house-fixed, sign-rotating: cells never move; the sign shown in each cell is derived from the ascendant.

Core props (NorthIndianChart)

| Prop | Type | Default | Notes | | --------------------------- | --------------------------------- | ---------------- | ----------------------------------------- | | ascendantRashi | RashiNumber | — | Sign in house 1. | | planets | PlanetPlacement[] | — | See below. | | size | number | 300 | Rendered edge length (px). | | theme | ChartTheme \| PartialChartTheme | light | Partial is merged over the light default. | | renderRashiLabel | (sign, house) => string | numeric | e.g. return RASHI_GLYPHS[sign]. | | planetAbbreviations | Record<string,string> | built-in | Localise glyphs. | | showRashiNumbers | boolean | true | | | showHouseNumbers | boolean | false | | | showAscLabel / ascLabel | boolean / string | true / "Asc" | | | houseFill | (house) => string \| undefined | — | Highlight cells. | | onPressHouse | (info: HousePressInfo) => void | — | Enables tap regions. | | onPressInfo | () => void | — | Shows an info button. |

PlanetPlacement:

interface PlanetPlacement {
  id: PlanetId | string; // 'sun'..'ketu' or any custom body
  rashi: RashiNumber; // 1..12
  isRetrograde?: boolean; // appends 'ᴿ'
  dignity?: Dignity; // 'exalted' | 'debilitated' | 'ownSign' | 'combust' | ...
  degree?: number; // optional, for your own tooltips
  label?: string; // hard override of the glyph
}

Legend + fullscreen

const [legend, setLegend] = useState(false);
const [full, setFull] = useState(false);

<NorthIndianChart {...chart} onPressInfo={() => setLegend(true)} />

<ChartLegendBottomSheet visible={legend} onClose={() => setLegend(false)} />

<FullscreenChartModal
  visible={full}
  onClose={() => setFull(false)}
  title="Kundli"
  subtitle="Ascendant: Leo"
  chartProps={{ ascendantRashi: 5, planets }}
/>

Theming

import { darkChartTheme, mergeTheme } from 'react-native-kundli-chart';

// Full theme:
<NorthIndianChart {...chart} theme={darkChartTheme} />

// Partial merged over light:
<NorthIndianChart {...chart} theme={{ colors: { frame: '#B8860B' } }} />

// Partial merged over dark:
<NorthIndianChart {...chart} theme={mergeTheme({ colors: { frame: '#B8860B' } }, darkChartTheme)} />

Also exported

Pure helpers (signInHouse, houseOfPlanet, groupPlanetsByHouse, planetsPerRow, chunk), the render hook useChartLayout, all geometry constants (HOUSE_LAYOUT, HOUSE_POLYGONS, …), and reference data (RASHI_NAMES, RASHI_LORDS, RASHI_GLYPHS, PLANET_NAMES, …). See docs/USAGE.md.

Documentation

License

MIT