@algolia/satellite

中文文档
2.15.0发布于 2026/10/20MITTypeScriptESM + CJS近 30 天下载 3755

Algolia design system React components

原始使用文档
文档目录6 节
  1. Installation
  2. Quick start
  3. Usage
  4. Integrating it on an existing project
  5. I want to build a quick prototype
  6. [ADVANCED] I want to use tailwind directly

Satellite

Nothing to see here

Library documentation | NPM | Storybook | Figma

Installation

yarn add @algolia/satellite

Quick start

import React from "react";
import ReactDOM from "react-dom";

import "@algolia/satellite/satellite.min.css";

import { Satellite, Button } from "@algolia/satellite";

const App = () => (
  <Satellite>
    <Button>Hurray!</Button>
  </Satellite>
);

ReactDOM.render(<App />, document.getElementById("root"));

Usage

Integrating it on an existing project

You can import @algolia/satellite/satellite.min.css before the rest of your styles. It contains a slightly modified version of normalize.css as well as the style for the library's components.

If you use scss and want to reuse the colors to build custom components, they are available in @algolia/satellite/styles/scss/colors.scss.

If you use some form of css-in-js library and want to reuse the colors to build custom components, they are available in @algolia/satellite/styles/scss/colors.scss

I want to build a quick prototype

You can import @algolia/satellite/satellite.css before the rest of your styles. It contains all the classes generated by the library's tailwind config, unpurged. The classes are prefixed with stl-. It is recommended to use the stl tag template function available in @algolia/satellite;

Please refer to the official documentation to see which classes are available https://tailwindcss.com/

import React from "react";
import ReactDOM from "react-dom";

import "@algolia/satellite/satellite.min.css";

import { Satellite, Button, stl } from "@algolia/satellite";

const loading = true;

const App = () => (
  <Satellite>
    <div
      className={stl`
        flex flex-col m-4
        ${loading && "hidden"}
      `}
    >
      <Button className={stl`mb-2`}>Clap your hands!</Button>
      <Button>Hurray!</Button>
    </div>
  </Satellite>
);

ReactDOM.render(<App />, document.getElementById("root"));

[ADVANCED] I want to use tailwind directly

First install tailwindcss

yarn add -D tailwindcss

Example main.css

@tailwind base;
@tailwind components;
@tailwind utilities;

@layer components {
  /* your custom components */
}

Example postcss.config.js

// ...

const plugins = [
  require("postcss-import"),
  require("tailwindcss")(tailwindConfig),
  require("autoprefixer"),
  cssnano({ preset: "default" }),
];

module.exports = { plugins };

Example tailwind.config.js

const { makePurgeCssExtractor } = require('@algolia/satellite');
const satelliteConfig = require("@algolia/satellite/cjs/styles/tailwind.config.js");

module.exports = {
  presets: [satelliteConfig],
  content: [
    files: [
      `node_modules/@algolia/satellite/**/*.js`,
      `node_modules/react-day-picker/lib/style.css`,
      `node_modules/react-day-picker/src/**/*.js`,

      `src/**/*.{ts,tsx,js,jsx}`,
      // Any other sources files
    ],
    extract: makePurgeCssExtractor(prefix),
  ],
  theme: {
    extend: {
      // any colors, fonts... you want to add
    }
  },
  plugins: [
    // extra plugins you want to add
  ]
};

Example index.jsx

import React from "react";
import ReactDOM from "react-dom";

import "./main.css";

import { Satellite, Button, stl } from "@algolia/satellite";

const loading = true;

const App = () => (
  <Satellite>
    <div
      className={stl`
        flex items-center justify-center
        ${loading && "hidden"}
      `}
    >
      <Button>Hurray!</Button>
    </div>
  </Satellite>
);

ReactDOM.render(<App />, document.getElementById("root"));

版本与发布记录

@algolia/satellite 共发布 360 个版本,首次发布于 2019/04/23;过去 12 个月发布了 14 个版本。

版本发布日期距今
2.15.0latest2026/10/2016 天前
2.14.02026/06/114 个月前
2.13.12026/06/114 个月前
2.13.02026/05/046 个月前
2.12.02026/04/136 个月前
2.11.02026/04/136 个月前

其他发布通道:beta → 1.0.0-beta.150,rc → 2.3.0-rc.13。

关于 @algolia/satellite 的常见问题

@algolia/satellite 是什么?

Algolia design system React components

如何安装 @algolia/satellite?

在项目目录运行 npm install @algolia/satellite,或使用 pnpm add / yarn add / bun add。它还需要宿主项目提供 peer 依赖:react(^17.0.0)、react-dom(^17.0.0)。npm 7 及以上与 pnpm 8 及以上默认会自动安装必需的 peer 依赖,Yarn 需要手动安装。

@algolia/satellite 支持 TypeScript 吗?

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

@algolia/satellite 支持 ESM 还是 CommonJS?

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

@algolia/satellite 需要什么版本的 Node.js?

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

@algolia/satellite 可以商用吗?

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

@algolia/satellite 的下载量有多少?

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

@algolia/satellite 还在维护吗?

最新版本 2.15.0 发布于 2026/10/20(16 天前);至今共发布 360 个版本,其中过去 12 个月发布了 14 个;首次发布于 2019/04/23。发布频率只是参考信号:功能稳定的工具可能很少需要更新,建议结合源码仓库的 issue 和提交记录判断。