# IStyleData

> Language fallback: requested `zh-CN`; content is `en-US`.

- Human documentation: [https://docs.univer.ai/zh-CN/reference/types/style-data](https://docs.univer.ai/zh-CN/reference/types/style-data)

- Agent Markdown: [https://docs.univer.ai/zh-CN/reference/types/style-data.md](https://docs.univer.ai/zh-CN/reference/types/style-data.md)

- Requested language: `zh-CN`

- Content language: `en-US`

- Documentation version: `1.0.0-rc.0`

- Source: [types/style-data.mdx](https://github.com/dream-num/documentation/blob/dev/content/reference/types/style-data.mdx)

---

Cell formatting, including fonts, fills, borders, alignment, and wrapping. Store a style directly in `ICellData.s` or register it in `IWorkbookData.styles` and reference its ID.

## Import

```ts
import type { IStyleData } from '@univerjs/core'
```

## Definition

```ts
interface IStyleData extends IStyleBase {
  stf?: BooleanNumber

  tr?: Nullable<ITextRotation>

  td?: Nullable<TextDirection>

  ht?: Nullable<HorizontalAlign>

  vt?: Nullable<VerticalAlign>

  tb?: Nullable<WrapStrategy>

  pd?: Nullable<IPaddingData>
}
```

## Fields

### `stf`

Optional · `BooleanNumber | undefined`

Whether the font size should shrink to fit the cell width.

### `tr`

Optional · `Nullable<ITextRotation>`

textRotation

### `td`

Optional · `Nullable<TextDirection>`

textDirection

### `ht`

Optional · `Nullable<HorizontalAlign>`

horizontalAlignment

### `vt`

Optional · `Nullable<VerticalAlign>`

verticalAlignment

### `tb`

Optional · `Nullable<WrapStrategy>`

wrapStrategy

### `pd`

Optional · `Nullable<IPaddingData>`

padding

### `ff`

Optional · `Nullable<string>`

fontFamily

### `eastAsiaFontFamily`

Optional · `Nullable<string>`

Font family used for East Asian characters in rich text.

### `fs`

Optional · `number | undefined`

Font size in points (pt), where 1 pt is 1/72 inch.

### `it`

Optional · `BooleanNumber | undefined`

italic
0: false
1: true

### `bl`

Optional · `BooleanNumber | undefined`

bold
0: false
1: true

### `ul`

Optional · `ITextDecoration | undefined`

underline

### `bbl`

Optional · `ITextDecoration | undefined`

bottomBorerLine

### `st`

Optional · `ITextDecoration | undefined`

strikethrough

### `ol`

Optional · `ITextDecoration | undefined`

overline

### `bg`

Optional · `Nullable<IColorStyle>`

background

### `bd`

Optional · `Nullable<IBorderData>`

border

### `cl`

Optional · `Nullable<IColorStyle>`

foreground

### `va`

Optional · `Nullable<BaselineOffset>`

(Subscript 下标 /Superscript上标 Text)

### `n`

Optional · `Nullable<{ pattern: string; }>`

Numfmt pattern

## Related types

* [`IStyleBase`](https://unpkg.com/@univerjs/core@1.0.0-rc.0/lib/types/types/interfaces/i-style-data.d.ts)
* [`BooleanNumber`](https://docs.univer.ai/zh-CN/reference/enums/boolean-number.md)
* [`ITextRotation`](https://unpkg.com/@univerjs/core@1.0.0-rc.0/lib/types/types/interfaces/i-style-data.d.ts)
* [`Nullable`](https://unpkg.com/@univerjs/core@1.0.0-rc.0/lib/types/shared/types.d.ts)
* [`TextDirection`](https://unpkg.com/@univerjs/core@1.0.0-rc.0/lib/types/types/enum/text-style.d.ts)
* [`HorizontalAlign`](https://docs.univer.ai/zh-CN/reference/enums/horizontal-align.md)
* [`VerticalAlign`](https://docs.univer.ai/zh-CN/reference/enums/vertical-align.md)
* [`WrapStrategy`](https://docs.univer.ai/zh-CN/reference/enums/wrap-strategy.md)
* [`IPaddingData`](https://unpkg.com/@univerjs/core@1.0.0-rc.0/lib/types/types/interfaces/i-style-data.d.ts)

**Package:** [`@univerjs/core`](https://docs.univer.ai/zh-CN/reference/packages/plugins/univerjs/core.md) · [Type definitions](https://unpkg.com/@univerjs/core@1.0.0-rc.0/lib/types/types/interfaces/i-style-data.d.ts)
