> ## Documentation Index
> Fetch the complete documentation index at: https://docs.reducto.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Styles

## `Style`

Import from `@reductoai/docx/node`, `@reductoai/docx/officejs`.

### Style properties

| Name | Type | Description |
| - | - | - |
| `automaticallyUpdate` | `boolean` | Word redefines the style from the text it is applied to (`w:autoRedefine`). |
| `baseStyle` | `string` | Display name of the `w:basedOn` style; "" when the style stands alone. |
| `borders` | `BorderCollection` | read-only `w:pBdr` on a paragraph style, `w:tblBorders` on a table style. Character and list styles refuse. |
| `builtIn` | `boolean` | read-only Word flags user-defined styles with `w:customStyle`; every other style is one of its own. |
| `font` | `Font` | read-only |
| `frame` | `Frame` | read-only office.js Style.frame: the frame of a paragraph style (its w:framePr). Setting a member frames every paragraph in the style; Frame.delete removes it. |
| `hasProofing` | `boolean` | office.js Style.hasProofing: Word reads and writes it as w:noProof, the reverse of its name. |
| `id` | `string` | read-only The OOXML `w:styleId`; not part of Microsoft's Style surface. |
| `inUse` | `boolean` | read-only A default style, or one the main story, a header, a footer, or a footnote/endnote references through pStyle/rStyle/tblStyle. |
| `languageId` | `string` | office.js Style.languageId: the Latin proofing language as a Word.LanguageId name, "" when unset. |
| `languageIdFarEast` | `string` | office.js Style.languageIdFarEast: the East Asian language (w:lang/@w:eastAsia), "" when unset. |
| `linked` | `boolean` | read-only office.js Style.linked: as in Word, true on the paragraph side of a pair only. |
| `linkStyle` | `Style \| null` | office.js Style.linkStyle: the paired style of the other kind; Word answers Normal when there is none. |
| `listLevelNumber` | `number` | read-only office.js Style.listLevelNumber: the linked list level, 1 through 9; 0 when the style has no list. |
| `listTemplate` | `ListTemplate \| null` | read-only office.js Style.listTemplate: the list this paragraph style numbers with, or null. |
| `locked` | `boolean` | |
| `nameLocal` | `string` | Extension: renaming rewrites `w:name` only. The style ID never moves, so every pStyle/rStyle/tblStyle reference keeps pointing at this style. OfficeJS spells the rename `style.set({ nameLocal })`. |
| `nextParagraphStyle` | `string` | Display name of the style Word applies to the next paragraph (`w:next`). |
| `noSpaceBetweenParagraphsOfSameStyle` | `boolean` | Drop the space between neighbouring paragraphs of this style (`w:pPr/w:contextualSpacing`); effective through the `w:basedOn` chain. |
| `paragraphFormat` | `ParagraphFormat` | read-only Paragraph and table styles carry a `w:pPr`; a table style's is the cells' paragraph base. |
| `priority` | `number` | Word's style-gallery sort key (`w:uiPriority`), 0..99. |
| `quickStyle` | `boolean` | Shown in Word's Quick Styles gallery (`w:qFormat`). |
| `shading` | `Shading` | read-only `w:shd` under `w:pPr`, `w:rPr`, or `w:tcPr` per style type; list styles refuse. |
| `tableStyle` | `TableStyle` | read-only |
| `type` | `StyleType` | read-only |
| `unhideWhenUsed` | `boolean` | |
| `visibility` | `boolean` | Visible in the style gallery: the inverse of OOXML's `w:semiHidden`. |

### `delete()`

```ts theme={null}
delete(): void
```

Remove the style and every reference to it, so nothing dangles: pStyle,
rStyle and tblStyle references in the main story, headers, footers, notes
and numbering levels are dropped (the content falls back to defaults),
other styles' `w:basedOn` inherits this style's own base, their `w:next`
and `w:link` are dropped, and a settings `w:defaultTableStyle` naming it
goes too. `Style.inUse` stays the pre-delete safety read.

### `getOoxml()`

```ts theme={null}
getOoxml(): ClientResult<string>
```

Extension: the style's own `w:style` element, the provenance escape hatch.

### `getRanges()`

```ts theme={null}
getRanges(): Range[]
```

Extension: live ranges over the MAIN story where this style is used —
whole paragraphs for a paragraph style, run spans for a character style.
Direct references only; table and list styles refuse.

### `linkToListTemplate()`

```ts theme={null}
linkToListTemplate(listTemplate: ListTemplate, listLevelNumber?: number): void
```

office.js Style.linkToListTemplate; listLevelNumber (1 through 9, default 1) is VBA's second
argument. Paragraphs in the style number at that level, as a heading style in a multilevel list.

### `set()`

```ts theme={null}
set(properties: StyleUpdateData, options?: UpdateOptions): void
```
