blueprint README

The project's README from github.com/palantir/blueprint. As one markdown file: README.md.

Autorelease

Blueprint CircleCI

Blueprint is a React-based UI toolkit for the web.

It is optimized for building complex, data-dense web interfaces for desktop applications which run in modern browsers. This is not a mobile-first UI toolkit.

Read the introductory blog post ▸

View the full documentation ▸

Try it out on CodeSandbox ▸

Read frequently asked questions (FAQ) on the wiki ▸

Changelog

Blueprint's change log and migration guides for major versions live on the repo's Github wiki.

Packages

This repository contains multiple projects in the packages/ directory that fall into 3 categories:

Libraries

These are the component libraries we publish to NPM.

Applications

These are hosted on GitHub Pages as static web applications:

These are used as development playground environments:

Build tooling

These packages define development dependencies and contain build configuration. They adhere to the standard NPM package layout, which allows us to keep clear API boundaries for build configuration and isolate groups of devDependencies. They are published to NPM in order to allow other Blueprint-related projects to use this infrastructure outside this monorepo.

Contributing

Looking for places to contribute to the codebase? First read the contribution guidelines, then check out the "help wanted" label.

Development

pnpm manages third-party and inter-package dependencies in this monorepo. Builds are orchestrated via Nx's task runner and NPM scripts. Lerna-Lite is used to prepare releases.

Prerequisites: Node.js v24.11+ (see version specified in .nvmrc), pnpm v10.x (see version specified in package.json)

One-time setup

First, ensure you have nvm (Node Version Manager) installed.

After cloning this repo, run:

  1. nvm use to use the supported Node version for Blueprint development.
  2. corepack enable to activate pnpm as the Node package manager.
  3. pnpm install to install all dependencies for the monorepo.
    1. If seeing an error like "Error when performing the request ...", you may be using a VPN that needs to be disabled to install the dependencies.
  4. If running on Windows:
    1. npm install -g windows-build-tools to install build tools globally
    2. Ensure bash is your configured script-shell by running:
      npm config set script-shell "C:\\Program Files\\git\\bin\\bash.exe"
      (reset this by running npm config delete script-shell)
  5. pnpm verify to ensure you have all the build tooling working properly.
    1. There may currently be some errors when running this step, even though everything is set up properly, see https://github.com/palantir/blueprint/issues/6926 for more info.
  6. (Optional) Run pnpm dev:demo to start the demo app and verify your setup is working.

Incorporating upstream changes

If you were previously in a working state and have just pulled new code from develop:

Developing libraries

There are a few ways to run development scripts, here they are listed from simplest to more advanced usage:

Updating documentation

Much of Blueprint's documentation lives inside source code as JSDoc comments in .tsx files and KSS markup in .scss files. This documentation is extracted and converted into static JSON data using documentalist. If you are updating documentation sources (not the docs UI code which lives in packages/docs-app or the docs theme in packages/docs-theme), you'll need to run pnpm compile from packages/docs-data to see changes reflected in the application. For simplicity, an alias script pnpm docs-data exists in the root to minimize directory hopping.

Updating icons

The One-time setup and Incorporating upstream changes steps should produce the generated source code in this repo used to build the icons documentation. This is sufficient for most development workflows.

If you are updating icons or adding new ones, you'll need to run pnpm compile in packages/icons to see those changes reflected before running any of the dev scripts.

Thanks

Chromatic

Thanks to Chromatic for providing the visual testing platform that helps us review UI changes and catch visual regressions.

License

This project is made available under the Apache 2.0 License.

blueprint (palantir/blueprint)

Searching Database…

22.1K ·GitHub
这是什么?Blueprint 是 Palantir 推出的基于 React 的网页 UI 工具包:一套现成的 UI 组件库,用 TypeScript 编写、以 Sass 设置样式,采用 Apache 2.0 许可证发布。
它是一个完整的框架,还是可以接入现有 React 应用的库?是库,不是框架:它是一个包含多个独立组件包的 monorepo,样式用 Sass 编写,你可以在自己的 React 应用中自由组合使用;它不会规定你其余的技术栈。
怎么搭好一个能跑起来的开发环境?克隆仓库,在根目录运行 pnpm install,然后运行 pnpm verify,检查整个构建工具链是否正常工作。
构建之前需要先装好什么?需要 Node.js 24.14.1 或更新版本,以及 pnpm 11.3.0,两者都在仓库的 engines 字段里固定了版本;在 Windows 上你还需要 git-bash,并把 npm 的 script-shell 设置指向它。
配置环境时有什么要注意的坑?pnpm verify 目前即使一切配置正确也可能报一些错误,所以安装完成后出现几条红色提示,并不一定说明你哪里做错了。
它只支持网页,还是有原生或移动端版本?仅限网页:Blueprint 在浏览器里渲染 React 组件,没有原生桌面或移动端目标。
这个 monorepo 里包含哪些组件包?除了核心组件集之外,还有专门的图标、日期和时间控件、下拉选择组件、表格等组件包,以及配套的文档、演示和落地页应用。
开发时能在本地预览这些组件吗?可以 —— pnpm dev 会监听所有包并通过 webpack-dev-server 启动文档应用,各个库也有自己的脚本,比如 pnpm dev:table,而 pnpm dev:demo 可以启动一个独立的演示应用。
这些组件的文档是怎么生成的?文档就写在源代码里:.tsx 文件中的 JSDoc 注释和 .scss 文件中的 KSS 标记,会由 Documentalist 提取成静态 JSON,供文档应用使用。
团队是怎么发现界面上的视觉回归问题的?他们使用 Chromatic 这个视觉测试平台来审查 UI 变更,在上线之前发现视觉上的回归问题。
Creator
palantir
Size
397.6 MB
Stars
22.1K
Age
9y
Commits · 90 Days