# @antdp/document-title

> 设置页面标题

Latest version **2.1.2** (published 2025-02-11) · MIT license · 0 weekly downloads

## Install

```sh
npm install @antdp/document-title
pnpm add @antdp/document-title
yarn add @antdp/document-title
bun add @antdp/document-title
```

## Health

**Score 55/100 (C)** — status: stable.

Positive: has types; esm support; no vulnerabilities; has provenance; high maintenance score.

Warnings: low downloads.

Negative: stale.

## Facts

| | |
|---|---|
| Version | 2.1.2 |
| Published | 2025-02-11 |
| First published | 2020-05-12 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | ESM + CommonJS |
| Dependencies | 1 |
| Unpacked size | 4.9 KB |
| Known vulnerabilities | 0 (+1 in 1 direct dependencies) |
| Install scripts | no |
| Provenance | attested (GitHub Actions) |
| GitHub stars | 18 |
| Maintainers | uiwjs, wcjiang |
| Keywords | document, title, antdp, antd |

## Links

- npm: https://www.npmjs.com/package/@antdp/document-title
- Repository: https://github.com/antdpro/antdp.git#master
- Homepage: https://antdpro.github.io/antdp
- Issues: https://github.com/antdpro/antdp/issues
- npm.io page: https://npm.io/package/@antdp/document-title

## Dependencies (1)

- [@babel/runtime](https://npm.io/package/@babel/runtime.md) ~7.20.1

## Alternatives

- [@cantoo/pdf-lib](https://npm.io/package/@cantoo/pdf-lib.md) — 297.9K weekly downloads
- [datatables.net-buttons](https://npm.io/package/datatables.net-buttons.md) — 200.1K weekly downloads
- [@ckeditor/ckeditor5-export-pdf](https://npm.io/package/@ckeditor/ckeditor5-export-pdf.md) — 167.0K weekly downloads
- [scanbot-web-sdk](https://npm.io/package/scanbot-web-sdk.md) — 15.0K weekly downloads
- [@syncfusion/ej2-angular-pdfviewer](https://npm.io/package/@syncfusion/ej2-angular-pdfviewer.md) — 8.8K weekly downloads

## Recent versions

- 2.1.2 (latest) — 2025-02-11
- 2.0.0-bate.5 (bate) — 2023-04-01
- 2.1.1 — 2024-03-28
- 2.0.24 — 2024-03-28
- 2.0.23 — 2023-11-10
- 2.0.22 — 2023-10-11
- 2.0.21 — 2023-08-22
- 2.0.20 — 2023-06-21
- 2.0.19 — 2023-06-12
- 2.0.18 — 2023-06-10
- 2.0.17 — 2023-06-09
- 2.0.16 — 2023-06-07
- 2.0.15 — 2023-05-30
- 2.0.14 — 2023-05-29
- 2.0.13 — 2023-05-28
- … 95 more at https://npm.io/package/@antdp/document-title/versions

## README

@antdp/document-title
---

[![npm](https://img.shields.io/npm/v/@antdp/document-title.svg?maxAge=3600)](https://www.npmjs.com/package/@antdp/document-title)
[![npm download](https://img.shields.io/npm/dm/@antdp/document-title.svg?style=flat)](https://www.npmjs.com/package/@antdp/document-title)

设置页面标题。

如果需要通过当前组件方式渲染 title，配 `title: false` 可禁用内置的 `title` 渲染机制，`@antdp/config` 默认配置 `title: false`。

> - https://github.com/umijs/umi/pull/4345/files
> - https://umijs.org/zh-CN/config#title

## Installation

```bash
npm i @antdp/document-title --save
```

## Basic Usage

<!--rehype:bgWhite=true&codeSandbox=true&codePen=true-->
```tsx  mdx:preview
import React from 'react';
import DocumentTitle from '@antdp/document-title';

const Demo = () => (
  <DocumentTitle title="展示浏览器标题 - 首页">
    <h1>Home, sweet home.</h1>
  </DocumentTitle>
);

export default Demo
```

---
_Source: https://npm.io/package/@antdp/document-title · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
