---
title: Formatter.UnitStyle
framework: foundation
role: symbol
role_heading: Enumeration
path: foundation/formatter/unitstyle
---

# Formatter.UnitStyle

Specifies the width of the unit, determining the textual representation.

## Declaration

```swift
enum UnitStyle
```

## Overview

Overview The unit is represented in the shortest notation available. For example, for English, when formatting “3 pounds”: Formatter.UnitStyle.long is “3 pounds”; Formatter.UnitStyle.medium is “3 lb”; Formatter.UnitStyle.short is “3#”.

## Topics

### Constants

- [Formatter.UnitStyle.short](foundation/formatter/unitstyle/short.md)
- [Formatter.UnitStyle.medium](foundation/formatter/unitstyle/medium.md)
- [Formatter.UnitStyle.long](foundation/formatter/unitstyle/long.md)

### Initializers

- [init(rawValue:)](foundation/formatter/unitstyle/init(rawvalue:).md)

## Relationships

### Conforms To

- [BitwiseCopyable](swift/bitwisecopyable.md)
- [Equatable](swift/equatable.md)
- [Hashable](swift/hashable.md)
- [RawRepresentable](swift/rawrepresentable.md)
- [Sendable](swift/sendable.md)
- [SendableMetatype](swift/sendablemetatype.md)

## See Also

### Constants

- [Formatter.Context](foundation/formatter/context.md)
