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-iztro

v1.3.5

Published

基于iztro实现的react紫微斗数星盘组件。A react component used to generate an astrolabe of ziweidoushu based on iztro.

Downloads

31

Readme

📦 react-iztro

基于 iztro 实现的react组件,用于生成一张紫微斗数星盘。

react component of iztro used to generate an astrolabe of Zi Wei Dou Shu.

npm npm GitHub GitHub code size in bytes Package Quality


功能

  • 展示完整紫微斗数星盘

    包含所有 主星辅星杂耀四化神煞流耀 以及星耀的 亮度。高亮显示重要的星耀,比如 桃花星解神禄存天马

  • 合理的星耀分布

    用不同的颜色和字号来将 星耀宫名宫干 等分区域显示,解盘一目了然,直击重点。

  • 清晰的运限指示

    在宫位中明显的标示出 大限小限流年流月流日流时 所在宫位,点击运限指示按钮以后会显示重排后的运限宫名以及运限四化,更加方便的使用叠宫技巧解盘。

  • 流耀显示

    展示出各个流派都需要的 流耀,可自行选择自己熟悉的流耀进行解盘。

  • 三方四正指示线

    在中宫会显示 三方四正 指示线,点击运限时指示线的指向会动态跟随选中的最小那个运限流动,比如同时选择 流年流月,指示线会跟随 流月

  • 强大的动态运限

    中宫 里,除了显示基本信息和三方四正线以外,还加入了可以调整运限的按钮组,可以非常方便的移动各个维度的运限。

  • 实用的飞星展示

    点击宫干,可以看到宫干飞化出去的四化(以星耀背景色表示,红色:,蓝色:,绿色:,黑色:)。宫干有自化的时候会在星耀前面显示一条代表四化的色条。

  • 简单易用的组件

    零配置快速集成到你的页面中,对于集成几乎没有学习成本。你可以根据自己的页面风格自行调整样式,或控制各个元素的显示与隐藏(通过覆盖默认样式)。

集成到页面中的界面如下图所示。你也可以直接访问官方的 紫微派 - 紫微斗数在线排盘 查看效果。

如果你觉得该组件对你有用,希望给个⭐️⭐️鼓励一下。

安装

npm install react-iztro -S

当然你也可以使用 yarn

yarn add react-iztro

使用

import {Iztrolabe} from "react-iztro"

function App() {
  return (
    <div className="App" style={{ width: 1024, margin: '50px auto', boxShadow: '0 0 25px rgba(0,0,0,0.25)'}}>
      <Iztrolabe 
        birthday="2003-10-12" 
        birthTime={1} 
        birthdayType="solar" 
        gender="male" 
        horoscopeDate={new Date()} // 新增参数,设置运限日期【可选,默认为当前时间】
        horoscopeHour={1}  // 新增参数,设置流时时辰的索引【可选,默认会获取 horoscopeDate 时间】
      />
    </div>
  );
}

export default App;

克隆到本地

如果你想将代码克隆到本地查看或者修改代码,可以fork本仓库到你自己的仓库里,然后用以下步骤进行

  1. 克隆代码
git clone https://github.com/SylarLong/iztro-docs.git
  1. 安装依赖
npm install

或者

yarn
  1. 启动

    npm run storybook

    或者

    yarn storybook
  2. 预览

    打开浏览器,输入 http://localhost:6006 即可预览。

贡献

如果你想对本程序进行贡献,可以 fork 本仓库到你的仓库里进行改进,完成开发或者修复以后提交 pull request 到本仓库。