---
title: compact
framework: swiftui
role: symbol
role_heading: Type Property
path: swiftui/datepickerstyle/compact
---

# compact

A date picker style that displays the components in a compact, textual format.

## Declaration

```swift
@MainActor @preconcurrency static var compact: CompactDatePickerStyle { get }
```

## Discussion

Discussion Use this style when space is constrained and users expect to make specific date and time selections. Some variants may include rich editing controls in a pop up.

## See Also

### Getting built-in date picker styles

- [automatic](swiftui/datepickerstyle/automatic.md)
- [field](swiftui/datepickerstyle/field.md)
- [graphical](swiftui/datepickerstyle/graphical.md)
- [stepperField](swiftui/datepickerstyle/stepperfield.md)
- [wheel](swiftui/datepickerstyle/wheel.md)
