Declaration
import { Section } from 'swiftui-react-native';struct Section<Parent, Content, Footer>Initializers
7 SwiftUI initializers back <Section>. The props you pass pick one.
<Section>
children?: ReactNode
</Section>@export(implementation) init(@ContentBuilder content: () -> Content)childrenReactNodeContent. Strings become
Text; React Native views are laid out by Yoga and placed by SwiftUI.Swift
content: () -> Content
Also takes the common view props: modifiers, style and testID.
Overview
Use Section instances in views like List, Picker, and
Form to organize content into separate sections. Each section has
custom content that you provide on a per-instance basis. You can also
provide headers and footers for each section.
Collapsible sections
Create sections that expand and collapse by using an initializer that
accepts an isExpanded binding. A collapsible section in a List that
uses the ListStyle.sidebar style shows a disclosure indicator next to
the section's header. Tapping on the disclosure indicator toggles the
appearance of the section's content.
From Apple’s SwiftUI documentation. Code samples there are Swift.
Relationships
Conforms to
- Swift.Copyable
- Swift.Escapable
- TableRowContent
- View
See also
More in Lists and collections.
- ForEachA structure that computes views on demand from an underlying collection of identified data.
- FormA container for grouping controls used for data entry, such as in settings or inspectors.
- ListA container that presents rows of data arranged in a single column, optionally providing the ability to select one or more members.