# WhiteSpace

> Controls how whitespace and line breaks within an element's text are handled, similar to the CSS white-space property. Unlike the CSS property, only trailing whitespaces are collapsed, and whitespaces within the text are preserved. See white-space

## Definition

* **Type:** Enum
* **Namespace:** [UnityEngine.UIElements](/engine/6000.5/script-reference/unityengine/uielements.md)
* **Assembly:** UnityEngine.UIElementsModule

```csharp
public enum WhiteSpace
```

## Remarks

Whitespaces within TextFields are not collapsed.

## Fields

| Value                                                                                   | Description                                                                                                                           |
| --------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------- |
| [Normal](/engine/6000.5/script-reference/unityengine/uielements/whitespace/normal.md)   | Trailing sequences of whitespace are collapsed into a single whitespace. Text will wrap when necessary. This is the default behavior. |
| [NoWrap](/engine/6000.5/script-reference/unityengine/uielements/whitespace/nowrap.md)   | Trailing sequences of whitespace are collapsed into a single whitespace. Text will never wrap to the next line.                       |
| [Pre](/engine/6000.5/script-reference/unityengine/uielements/whitespace/pre.md)         | Whitespace is preserved. Text will only wrap on line breaks.                                                                          |
| [PreWrap](/engine/6000.5/script-reference/unityengine/uielements/whitespace/prewrap.md) | Whitespace is preserved. Text will wrap when necessary.                                                                               |
