@bigbinary/neeto-site-blocks

中文文档
2.4.7发布于 2026/11/01MITTypeScriptESM + CJS零依赖近 30 天下载 2506

Common blocks for neeto-site

原始使用文档
文档目录4 节
  1. Installation
  2. Usage
  3. Eg: FeatureWithRightImage
  4. Development

@bigbinary/neeto-site-blocks

neetoSiteBlocks is the library that serves the building blocks for website in neeto-site. It is used in neeto-site-web and neeto-site-eui to serve the blocks.

Installation

yarn add @bigbinary/neeto-site-blocks

Usage

Eg: FeatureWithRightImage

Props

  1. id: To specify the id of the block.
  2. configuration: Object containing the configuration for the block. It contains the following keys:
    1. design: To specify the design of the block.
    2. properties: To specify the properties of the block.
  3. className: To specify the external classnames.

Here is an example of how to use the FeatureWithRightImage block.

import { FeatureWithImage } from "@bigbinary/neeto-site-blocks";

configurations: {
      properties: {
        content: {
          title: "Title",
          description: "Description",
          position: "left",
        },
        buttons: [],
        image: {
          src:
            "https://tailwindui.com/img/component-images/inbox-app-screenshot-2.jpg",
          position: "right",
        },
        backgroundImage: {
          src: "",
        },
      },
      design: {
        body: {
          backgroundColor: "#FFFFFF",
          paddingVertical: 20,
          borderTop: {
            borderStyle: "none",
            borderWidth: 0,
            borderColor: "#FFFFFF",
          },
          borderBottom: {
            borderStyle: "none",
            borderWidth: 0,
            borderColor: "#FFFFFF",
          },
        },
        title: {
          fontSize: "3xl",
          fontWeight: "extrabold",
          color: "#2F3941",
          marginTop: 0,
          marginBottom: 5,
          lineHeight: "none",
          letterSpacing: "normal",
        },
        description: {
          fontSize: "base",
          fontWeight: "normal",
          color: "#68737D",
          marginTop: 0,
          marginBottom: 8,
          lineHeight: "normal",
          letterSpacing: "normal",
        },
        buttons: {
          fontSize: "sm",
          fontWeight: "medium",
          color: "#FFFFFF",
          backgroundColor: "#4F46E5",
          border: {
            borderStyle: "none",
            borderWidth: 0,
            borderColor: "#4F46E5",
          },
          borderRadius: "sm",
          paddingHorizontal: 4,
          paddingVertical: 2,
          letterSpacing: "normal",
        },
        image: {
          width: "3/4",
          borderRadius: "sm",
        },
        backgroundImage: {
          backgroundSize: "cover",
          backgroundPosition: "center",
          backgroundRepeat: "no-repeat",
        },
      },
    },

const FeatureWithImageBlock = () => {
  return (
    <FeatureWithImage
      id="feature-with-right-image"
      configuration={configuration}
      className="my-10"
    />
  );
};

Development

Install all the dependencies by executing the following command

yarn install
yarn start

This will open up a playground for building the different blocks.

Building and releasing.

The @bigbinary/neeto-site-blocks package gets published to NPM when we merge a PR with patch, minor or major label to the main branch. The patch label is used for bug fixes, minor label is used for new features and major label is used for breaking changes. You can checkout the Create and publish releases workflow in GitHub Actions to get a live update.

In case if you missed to add the label, you can manually publish the package. For that first you need to create a PR to update the version number in the package.json file and merge it to the main branch. After merging the PR, you need to create a new github release from main branch. Whenever a new release is created with a new version number, the github actions will automatically publish the built package to npm. You can checkout the Publish to npm workflow in GitHub Actions to get a live update.

Please note that before publishing the package, you need to verify the functionality in some of the neeto web-apps locally using yalc package manager. The usage of yalc is explained in this video: https://youtu.be/QBiYGP0Rhe0

版本与发布记录

@bigbinary/neeto-site-blocks 共发布 371 个版本,首次发布于 2022/08/26;过去 12 个月发布了 22 个版本。

版本发布日期距今
2.4.7latest2026/11/017 天前
2.4.62026/11/017 天前
2.5.02026/11/017 天前
2.4.52026/11/017 天前
2.4.42026/10/2118 天前
2.4.32026/10/081 个月前

其他发布通道:beta → 1.11.0-beta6。

关于 @bigbinary/neeto-site-blocks 的常见问题

@bigbinary/neeto-site-blocks 是什么?

Common blocks for neeto-site

如何安装 @bigbinary/neeto-site-blocks?

在项目目录运行 npm install @bigbinary/neeto-site-blocks,或使用 pnpm add / yarn add / bun add。它还需要宿主项目提供 peer 依赖:axios(1.18.0)、ramda(0.29.0)、react(18.2.0)、react-dom(18.2.0)、classnames(2.3.1)、prop-types(15.8.1)、tailwindcss(^3.4.1)、framer-motion(11.2.14)、@babel/runtime(7.17.9)、styled-components(^5.3.6)、@bigbinary/neeto-cist(latest)、react-frame-component(5.2.5)、@bigbinary/neeto-commons-frontend(latest)。npm 7 及以上与 pnpm 8 及以上默认会自动安装必需的 peer 依赖,Yarn 需要手动安装。

@bigbinary/neeto-site-blocks 支持 TypeScript 吗?

支持。包内自带 TypeScript 类型声明(package.json 声明了 types 入口),安装后即可获得类型提示,无需再安装 @types 包。

@bigbinary/neeto-site-blocks 支持 ESM 还是 CommonJS?

同时提供 ES Module 与 CommonJS 入口,import 和 require() 都可以使用,打包工具会自动选择合适的版本。

@bigbinary/neeto-site-blocks 需要什么版本的 Node.js?

package.json 的 engines 字段要求 Node.js >=18.12。版本不符时 npm 默认只给出警告,开启 engine-strict 后会拒绝安装。

@bigbinary/neeto-site-blocks 可以商用吗?

@bigbinary/neeto-site-blocks 使用 MIT 许可。宽松许可:允许商业使用、修改和再分发,通常只需在分发时保留原版权与许可声明。以上为概括,不构成法律意见,请以许可原文为准。

@bigbinary/neeto-site-blocks 的下载量有多少?

根据 npm 官方下载统计,@bigbinary/neeto-site-blocks 在 2026/10/08 – 2026/11/06 这 30 天内被下载 2,506 次,日均约 84 次。下载量会把 CI 构建、镜像同步和作为其他包依赖的安装一并计入,适合横向比较热度,不能直接等同于使用人数。

@bigbinary/neeto-site-blocks 还在维护吗?

最新版本 2.4.7 发布于 2026/11/01(7 天前);至今共发布 371 个版本,其中过去 12 个月发布了 22 个;首次发布于 2022/08/26。发布频率只是参考信号:功能稳定的工具可能很少需要更新,建议结合源码仓库的 issue 和提交记录判断。