---
title: Duration.UnitsFormatStyle.UnitWidth
framework: swift
role: symbol
role_heading: Structure
path: swift/duration/unitsformatstyle/unitwidth-swift.struct
---

# Duration.UnitsFormatStyle.UnitWidth

The width of a unit to use in formatting a duration.

## Declaration

```swift
struct UnitWidth
```

## Overview

Overview Use the provided unit widths with the width parameter of the Duration.UnitsFormatStyle initializers to customize the display of units in a formatted string.

## Topics

### Duration unit widths

- [abbreviated](swift/duration/unitsformatstyle/unitwidth-swift.struct/abbreviated.md)
- [condensedAbbreviated](swift/duration/unitsformatstyle/unitwidth-swift.struct/condensedabbreviated.md)
- [narrow](swift/duration/unitsformatstyle/unitwidth-swift.struct/narrow.md)
- [wide](swift/duration/unitsformatstyle/unitwidth-swift.struct/wide.md)

## Relationships

### Conforms To

- [Decodable](swift/decodable.md)
- [Encodable](swift/encodable.md)
- [Equatable](swift/equatable.md)
- [Hashable](swift/hashable.md)
- [Sendable](swift/sendable.md)
- [SendableMetatype](swift/sendablemetatype.md)

## See Also

### Working with unit widths

- [unitWidth](swift/duration/unitsformatstyle/unitwidth-swift.property.md)
