---
title: defaultLayout
framework: developertoolssupport
role: symbol
role_heading: Type Property
path: developertoolssupport/previewtrait/defaultlayout
---

# defaultLayout

Center the preview in a container the size of the device on which the preview is running.

## Declaration

```swift
@MainActor static var defaultLayout: PreviewTrait<Preview.ViewTraits> { get }
```

## Discussion

Discussion This is the same as the PreviewLayout.device layout, and is the default if you don’t specify a layout trait.

## See Also

### Getting a layout

- [fixedLayout(width:height:)](developertoolssupport/previewtrait/fixedlayout(width:height:).md)
- [fixedLayout(width:height:depth:)](developertoolssupport/previewtrait/fixedlayout(width:height:depth:).md)
- [sizeThatFitsLayout](developertoolssupport/previewtrait/sizethatfitslayout.md)
