List Class @beta
A collection of list items (Paragraphs). Lists can be appended to Paragraphs. Lists will be laid out on a new line. Each item in a list is laid out on a separate line.
Extends
Methods
Name | Description | |
---|---|---|
constructor(props?: ListProps): List Protected | ||
clearStyleOverrides(options?: ClearTextStyleOptions): void | Reset any styleOverrides applied to this component. | |
clone(): List | Create a deep copy of this component. | |
equals(other: TextBlockComponent): boolean | Returns true if this is equivalent to other . |
|
stringify(options?: TextBlockStringifyOptions, context?: TextBlockStringifyContext): string | Compute a string representation of this list by concatenating the string representations of all of its children. | |
toJSON(): ListProps | Convert this component to its JSON representation. | |
create(props?: Omit<ListProps, "type">): List Static | Create a list from its JSON representation. |
Properties
Name | Type | Description | |
---|---|---|---|
children Readonly | Paragraph[] | ||
isEmpty Accessor ReadOnly | boolean | Returns true if this component has no content or children. | |
type Readonly | "list" |
Inherited properties
Name | Type | Inherited from | Description |
---|---|---|---|
isWhitespace Accessor Inherited ReadOnly | boolean | TextBlockComponent | Returns true if the string representation of this component consists only of whitespace characters. Useful for checking if the component is visually empty (producing no graphics) or contains only spaces, tabs, or line breaks. |
overridesStyle Accessor Inherited ReadOnly | boolean | TextBlockComponent | Returns true if styleOverrides specifies any deviations from the TextBlock's AnnotationTextStyle. |
styleOverrides Accessor Inherited | TextStyleSettingsProps | TextBlockComponent | Deviations in individual properties of the TextStyleSettings in the AnnotationTextStyle. For example, if the style uses the "Arial" font, you can override that by settings styleOverrides.font.name to "Comic Sans". |
Defined in
Last Updated: 07 October, 2025
Found something wrong, missing, or unclear on this page? Raise an issue in our repo.