Properties of the TitledSection component.
Optionalchildren?: ReactNodeChildren are rendered without any modifications.
OptionalsectionHeadingProps?: SectionHeadingPropsProperties for the automatically generated section heading.
NOTE: This is only applied if title is a string.
Optionaltitle?: ReactNodeThe title component.
Strings are automatically wrapped in a SectionHeading. More complex nodes should use the SectionHeading internally.
Automatically manages the level of html headings such as
h1andh2.Use this component's
titleproperty or<SectionHeading />components in the children of this component instead of manual heading tags. Nested sections will automatically use the correct level for their current location.Titles are rendered as Chakra Headings by default.
Example: Simple string headings (1, 2 and 3 will be rendered as h1, h2 and h3):
When using using a string for the
titleprop, you can specify thesectionHeadingPropsto customize the properties of the automatically generated heading component.Example: custom section headings as children
Example: custom title rendering
You can also use completely custom components for the title. In this case, you should ensure that you use the
SectionHeadingcomponent within thetitlein some place. The section heading does not need to be the immediate child, you can wrap it any way you want.