Some checks failed
📦 Build / build (push) Has been cancelled
🧪 CI Test / test shard (1/4) (push) Has been cancelled
🧪 CI Test / test shard (2/4) (push) Has been cancelled
🧪 CI Test / test shard (3/4) (push) Has been cancelled
🧪 CI Test / test shard (4/4) (push) Has been cancelled
🧪 CI Test / test (push) Has been cancelled
🧪 CI Test / eslint (push) Has been cancelled
🧪 CI Test / typecheck (push) Has been cancelled
🔫 Sync to Pro / dispatch-sync (push) Has been cancelled
🔮 Sync Mirror / sync (push) Has been cancelled
47 lines
1.3 KiB
Markdown
47 lines
1.3 KiB
Markdown
# @univerjs/ui
|
|
|
|
[](https://npmjs.com/package/@univerjs/ui)
|
|
[](https://npmjs.com/package/@univerjs/ui)
|
|
[](https://npmjs.com/package/@univerjs/ui)
|
|
|
|
`@univerjs/ui` provides Univer's shared application UI framework, workbench services, menu infrastructure, dialogs, clipboard services, and Facade UI APIs.
|
|
|
|
## Package Overview
|
|
|
|
| Package | UMD global | CSS | Locales | Facade entry |
|
|
| --- | --- | :---: | :---: | :---: |
|
|
| `@univerjs/ui` | `UniverUi` | Yes | Yes | Yes |
|
|
|
|
## Installation
|
|
|
|
```sh
|
|
pnpm add @univerjs/ui
|
|
# or
|
|
npm install @univerjs/ui
|
|
```
|
|
|
|
Keep all `@univerjs/*` packages on the same version.
|
|
|
|
## Usage
|
|
|
|
```ts
|
|
import '@univerjs/ui/lib/index.css';
|
|
import EnUS from '@univerjs/ui/locale/en-US';
|
|
import { UniverUIPlugin } from '@univerjs/ui';
|
|
|
|
univer.registerPlugin(UniverUIPlugin);
|
|
|
|
// Merge EnUS into your Univer locale map when this package contributes UI text.
|
|
```
|
|
|
|
Exported plugin classes:
|
|
|
|
- `UniverUIPlugin`
|
|
- `UniverMobileUIPlugin`
|
|
|
|
## Resources
|
|
|
|
- [Documentation](https://docs.univer.ai)
|
|
- [NPM package](https://npmjs.com/package/@univerjs/ui)
|
|
- [GitHub repository](https://github.com/dream-num/univer)
|