# Shapes

- Human documentation: [https://docs.univer.ai/guides/docs/features/shape](https://docs.univer.ai/guides/docs/features/shape)

- Agent Markdown: [https://docs.univer.ai/guides/docs/features/shape.md](https://docs.univer.ai/guides/docs/features/shape.md)

- Requested language: `en-US`

- Content language: `en-US`

- Documentation version: `1.0.0-rc.0`

- Source: [docs/features/shape.mdx](https://github.com/dream-num/documentation/blob/dev/content/guides/docs/features/shape.mdx)

---

#### Package metadata

```json
{
  "plugins": [
    {
      "client": "@univerjs-pro/docs-shape"
    },
    {
      "client": "@univerjs-pro/docs-shape-ui",
      "locale": "@univerjs-pro/docs-shape-ui/locale/en-US",
      "style": "@univerjs-pro/docs-shape-ui/lib/index.css"
    }
  ],
  "server": false
}
```

The shape feature allows you to insert and edit shapes and drawings within a document, including basic geometric shapes, arrows, and flowchart elements.

## Introduction

In Univer Docs, shapes enable you to:

* **Insert geometric shapes**: Add rectangles, circles, arrows, and more.
* **Customize appearance**: Adjust fill colors, borders, and text.
* **Position freely**: Place shapes anywhere in the document.

## Plugin Mode

### Installation

#### npm

```bash
npm install @univerjs-pro/docs-shape @univerjs-pro/docs-shape-ui
```

#### pnpm

```bash
pnpm add @univerjs-pro/docs-shape @univerjs-pro/docs-shape-ui
```

#### yarn

```bash
yarn add @univerjs-pro/docs-shape @univerjs-pro/docs-shape-ui
```

#### bun

```bash
bun add @univerjs-pro/docs-shape @univerjs-pro/docs-shape-ui
```

### Usage

```typescript
import { UniverDocsShapePlugin } from '@univerjs-pro/docs-shape' // [!code ++]
import { UniverDocsShapeUIPlugin } from '@univerjs-pro/docs-shape-ui' // [!code ++]
import DocsShapeUIEnUS from '@univerjs-pro/docs-shape-ui/locale/en-US' // [!code ++]
import { LocaleType, mergeLocales, Univer } from '@univerjs/core'

import '@univerjs-pro/docs-shape-ui/lib/index.css' // [!code ++]

const univer = new Univer({
  locale: LocaleType.EN_US,
  locales: {
    [LocaleType.EN_US]: mergeLocales(
      DocsShapeUIEnUS, // [!code ++]
    ),
  },
})

univer.registerPlugin(UniverDocsShapePlugin) // [!code ++]
univer.registerPlugin(UniverDocsShapeUIPlugin) // [!code ++]
```

If you have a commercial license for Univer, please refer to [Using License in Client](https://docs.univer.ai/server/license.md#in-plugin-mode) for configuration.
