Skip to content

IntrinsicElements

Members

align{ children: Children; width: number; } | { children: Children; string: string; }

Indent the children of this component by either the number of characters indicated by the width prop, or by the provided string indicated by the string prop.

br{}

A regular line break. This will break if the line exceeds the print width, otherwise it will be a space.

breakParent{}

Force the parent group to break.

dedent{ children: Children; }

Decrease the indentation level of the children of this component. Indentation is determined by the print options provided to the Output component or source file.

dedentToRoot{ children: Children; }

Decrease the indentation level to the root level specified by <markAsRoot />, or else to no indentation.

fill{ children: Children; }

Similar to group, but will only place a line break before the last segment to exceed the print width. This is useful for formatting paragraphs of text where breaks are inserted prior to words which would otherwise exceed the print width.

group{ shouldBreak?: boolean; id?: symbol; children: Children; }

Attempt to render the children on a single line if possible. If a group contains <breakParent /> or a hard line, or if the group exceeds the print width, all linebreaks in the group will be broken.

hardline{}

A hard line break. This is a line that will always break, even if the group does not exceed print width.

hbr{}

A hard line break. This is a line that will always break, even if the group does not exceed print width.

ifBreak{ children: Children; flatContents?: Children; groupId?: symbol; }

Print children if the current group or already printed group specified by groupId is broken. Otherwise, flatContents is printed instead.

indent{ children: Children; }

Increase the indentation level of the children of this component. Indentation is determined by the print options provided to the Output component or source file.

indentIfBreak{ children: Children; groupId: symbol; negate?: boolean; }

Indent the children of this component if the group specified by groupId is broken (or not broken if negate is passed). The specified group must already be printed.

lbr{}

A literal line break. This will always break, even if the group does not exceed print width. The new line will ignore indentation.

line{}

A regular line break. This will break if the line exceeds the print width, otherwise it will be a space.

lineSuffix{ children: Children; }

Print this content at the end of the line. Useful for things like line comments.

lineSuffixBoundary{}

Force any line suffixes to print at this point.

literalline{}

A literal line break. This will always break, even if the group does not exceed print width. The new line will ignore indentation.

markAsRoot{ children: Children; }

Mark the current indentation level as “root” for the purposes of literal line breaks and dedentToRoot.

sbr{}

A soft line break. This will break if the line exceeds the print width, otherwise it will be be nothing.

softline{}

A soft line break. This will break if the line exceeds the print width, otherwise it will be be nothing.