---
title: "formStyle(_:)"
framework: swiftui
role: symbol
role_heading: Instance Method
path: "swiftui/view/formstyle(_:)"
---

# formStyle(_:)

Sets the style for forms in a view hierarchy.

## Declaration

```swift
nonisolated func formStyle<S>(_ style: S) -> some View where S : FormStyle

```

## Parameters

- `style`: The form style to set.

## Return Value

Return Value A view that uses the specified form style for itself and its child views.

## See Also

### Grouping inputs

- [Form](swiftui/form.md)
- [LabeledContent](swiftui/labeledcontent.md)
- [labeledContentStyle(_:)](swiftui/view/labeledcontentstyle(_:).md)
