ToolbarItemGroup

A model that represents a group of ToolbarItems which can be placed in the toolbar or navigation bar.

ComponentiOS 14.0+macOS 11.0+tvOS 14.0+watchOS 7.0+ToolbarItemGroup in SwiftUI

Declaration

React
import { ToolbarItemGroup } from 'swiftui-react-native';
Swift
nonisolated struct ToolbarItemGroup<Content> where Content : View

Initializers

2 SwiftUI initializers back <ToolbarItemGroup>. The props you pass pick one.

React
<ToolbarItemGroup
  placement?: SwiftUI.ToolbarItemPlacement
>
  children?: ReactNode
</ToolbarItemGroup>
Swift
nonisolated init(
    placement: ToolbarItemPlacement = .automatic,
    @ContentBuilder content: () -> Content
)
  • Which section of the toolbar all of its vended ToolbarItems should be placed in.

    Default `.automatic`

  • childrenReactNode

    Content. 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.

See also

More in Toolbars.