vyaz-monorepo / core/src / ListStyle
Interface: ListStyle
Defined in: core/src/types/Document.ts:420
Configuration for list markers (bullet or numbered).
Applies to the paragraph via ParagraphStyle.listStyle. Nested lists are supported via the level field (0-based).
Width consistency: For position: 'outside', all lines share the same indent regardless of marker width. Paragraph indentation = bulletIndent (or default fontSize * 1.5). The marker is positioned inside that zone. If the marker text is wider than the indent zone, bulletIndent is expanded to fit the widest marker across the entire list group during layout.
See
CSS Lists and Counters Module Level 3
Example
// Simple bullet list
{ type: 'bullet', position: 'outside', bulletChar: '•' }
// Numbered list starting at 5
{ type: 'number', numberFormat: 'decimal', startNumber: 5 }Properties
bulletChar?
optionalbulletChar?:string
Defined in: core/src/types/Document.ts:437
Override marker character for bullet lists. If not set, defaults depend on level:
- level 0:
'•'(U+2022 BULLET) - level 1:
'○'(U+25CB WHITE CIRCLE) - level 2:
'▪'(U+25AA BLACK SMALL SQUARE)
bulletFont?
optionalbulletFont?:string
Defined in: core/src/types/Document.ts:479
Font family for the marker (DrawingML buFont). Defaults to the font of the paragraph's first run.
bulletIndent?
optionalbulletIndent?:number
Defined in: core/src/types/Document.ts:458
Indent in px for the marker zone. All lines of the paragraph share this indent (for outside position). Default: fontSize * 1.5 (from the paragraph-level font size).
For numbered lists, the engine expands this to fit the widest marker across the entire list group.
bulletSize?
optionalbulletSize?:number
Defined in: core/src/types/Document.ts:473
Marker size relative to the paragraph's first run (DrawingML buSzPct / 100 000, e.g. 0.5 = 50 %). Defaults to 1 for numbers; for bullets 0.9 in mode: 'browser' and 1 in mode: 'office' (PowerPoint's default, measured).
indents?
optionalindents?:number[]
Defined in: core/src/types/Document.ts:465
Per-level indent overrides (indexed by nesting level). E.g. indents[1] is the indent for level 1 (first nested). Falls back to bulletIndent * (level + 1) if not specified.
level?
optionallevel?:number
Defined in: core/src/types/Document.ts:425
List nesting level (0-based). 0 = top-level.
numberFormat?
optionalnumberFormat?:NumberFormat
Defined in: core/src/types/Document.ts:440
Numbering format (only used when type === 'number'). Defaults to 'decimal'.
position?
optionalposition?:ListStylePosition
Defined in: core/src/types/Document.ts:428
Marker position. Defaults to 'outside'.
startNumber?
optionalstartNumber?:number
Defined in: core/src/types/Document.ts:448
Starting number for numbered lists. Defaults to 1. On a later item it starts a new count unless it equals the current count's own start or the next number (so it can be set on every item, as DrawingML startAt and @vyaz/converters' <ol start> do).
type
type:
ListType
Defined in: core/src/types/Document.ts:422
List type.
