# PreserveAspectRatio

> Represents literal string values for the SVG preserveAspectRatio attribute.

[API reference](/docs/api/index.md) › [HTML SVG](/docs/extensions/html-svg/reference/index.md) › [Values](/docs/extensions/html-svg/reference/values/index.md) › PreserveAspectRatio

| enum | `UIAwesome\Html\Svg\Values\PreserveAspectRatio` |
| --- | --- |
| Backed by | `string` |
| Source | [`src/Values/PreserveAspectRatio.php`](https://github.com/ui-awesome/html-svg/blob/main/src/Values/PreserveAspectRatio.php#L17) |

Represents literal string values for the SVG `preserveAspectRatio` attribute.

Provides the keyword and combined values used by the `preserveAspectRatio` attribute.

See also: [`Image::preserveAspectRatio()`](/docs/extensions/html-svg/reference/image/index.md#method-preserveAspectRatio), [`Marker::preserveAspectRatio()`](/docs/extensions/html-svg/reference/marker/index.md#method-preserveAspectRatio), [`Pattern::preserveAspectRatio()`](/docs/extensions/html-svg/reference/pattern/index.md#method-preserveAspectRatio), [`Svg::preserveAspectRatio()`](/docs/extensions/html-svg/reference/base/basesvg/index.md#method-preserveAspectRatio).

## Cases

| Case | Value | Description |
| --- | --- | --- |
| <span id="case-NONE"></span>`NONE` | `'none'` | `none` - Does not force uniform scaling. |
| <span id="case-X_MAX_Y_MAX"></span>`X_MAX_Y_MAX` | `'xMaxYMax'` | `xMaxYMax` - Align the `<min-x>+<width>` of the element's viewBox with the maximum X value of the viewport. |
| <span id="case-X_MAX_Y_MAX_MEET"></span>`X_MAX_Y_MAX_MEET` | `'xMaxYMax meet'` | `xMaxYMax meet` - Align the `<min-x>+<width>` of the element's viewBox with the maximum X value of the viewport. |
| <span id="case-X_MAX_Y_MAX_SLICE"></span>`X_MAX_Y_MAX_SLICE` | `'xMaxYMax slice'` | `xMaxYMax slice` - Align the `<min-x>+<width>` of the element's viewBox with the maximum X value of the viewport. |
| <span id="case-X_MAX_Y_MID"></span>`X_MAX_Y_MID` | `'xMaxYMid'` | `xMaxYMid` - Align the `<min-x>+<width>` of the element's viewBox with the maximum X value of the viewport. |
| <span id="case-X_MAX_Y_MID_MEET"></span>`X_MAX_Y_MID_MEET` | `'xMaxYMid meet'` | `xMaxYMid meet` - Align the `<min-x>+<width>` of the element's viewBox with the maximum X value of the viewport. |
| <span id="case-X_MAX_Y_MID_SLICE"></span>`X_MAX_Y_MID_SLICE` | `'xMaxYMid slice'` | `xMaxYMid slice` - Align the `<min-x>+<width>` of the element's viewBox with the maximum X value of the viewport. |
| <span id="case-X_MAX_Y_MIN"></span>`X_MAX_Y_MIN` | `'xMaxYMin'` | `xMaxYMin` - Align the `<min-x>+<width>` of the element's viewBox with the maximum X value of the viewport. |
| <span id="case-X_MAX_Y_MIN_MEET"></span>`X_MAX_Y_MIN_MEET` | `'xMaxYMin meet'` | `xMaxYMin meet` - Align the `<min-x>+<width>` of the element's viewBox with the maximum X value of the viewport. |
| <span id="case-X_MAX_Y_MIN_SLICE"></span>`X_MAX_Y_MIN_SLICE` | `'xMaxYMin slice'` | `xMaxYMin slice` - Align the `<min-x>+<width>` of the element's viewBox with the maximum X value of the viewport. |
| <span id="case-X_MID_Y_MAX"></span>`X_MID_Y_MAX` | `'xMidYMax'` | `xMidYMax` - Align the midpoint X value of the element's viewBox with the midpoint X value of the viewport. |
| <span id="case-X_MID_Y_MAX_MEET"></span>`X_MID_Y_MAX_MEET` | `'xMidYMax meet'` | `xMidYMax meet` - Align the midpoint X value of the element's viewBox with the midpoint X value of the viewport. |
| <span id="case-X_MID_Y_MAX_SLICE"></span>`X_MID_Y_MAX_SLICE` | `'xMidYMax slice'` | `xMidYMax slice` - Align the midpoint X value of the element's viewBox with the midpoint X value of the viewport. |
| <span id="case-X_MID_Y_MID"></span>`X_MID_Y_MID` | `'xMidYMid'` | `xMidYMid` - Align the midpoint X value of the element's viewBox with the midpoint X value of the viewport. |
| <span id="case-X_MID_Y_MID_MEET"></span>`X_MID_Y_MID_MEET` | `'xMidYMid meet'` | `xMidYMid meet` - Align the midpoint X value of the element's viewBox with the midpoint X value of the viewport. |
| <span id="case-X_MID_Y_MID_SLICE"></span>`X_MID_Y_MID_SLICE` | `'xMidYMid slice'` | `xMidYMid slice` - Align the midpoint X value of the element's viewBox with the midpoint X value of the viewport. |
| <span id="case-X_MID_Y_MIN"></span>`X_MID_Y_MIN` | `'xMidYMin'` | `xMidYMin` - Align the midpoint X value of the element's viewBox with the midpoint X value of the viewport. |
| <span id="case-X_MID_Y_MIN_MEET"></span>`X_MID_Y_MIN_MEET` | `'xMidYMin meet'` | `xMidYMin meet` - Align the midpoint X value of the element's viewBox with the midpoint X value of the viewport. |
| <span id="case-X_MID_Y_MIN_SLICE"></span>`X_MID_Y_MIN_SLICE` | `'xMidYMin slice'` | `xMidYMin slice` - Align the midpoint X value of the element's viewBox with the midpoint X value of the viewport. |
| <span id="case-X_MIN_Y_MAX"></span>`X_MIN_Y_MAX` | `'xMinYMax'` | `xMinYMax` - Align the `<min-x>` of the element's viewBox with the smallest X value of the viewport. |
| <span id="case-X_MIN_Y_MAX_MEET"></span>`X_MIN_Y_MAX_MEET` | `'xMinYMax meet'` | `xMinYMax meet` - Align the `<min-x>` of the element's viewBox with the smallest X value of the viewport. |
| <span id="case-X_MIN_Y_MAX_SLICE"></span>`X_MIN_Y_MAX_SLICE` | `'xMinYMax slice'` | `xMinYMax slice` - Align the `<min-x>` of the element's viewBox with the smallest X value of the viewport. |
| <span id="case-X_MIN_Y_MID"></span>`X_MIN_Y_MID` | `'xMinYMid'` | `xMinYMid` - Align the `<min-x>` of the element's viewBox with the smallest X value of the viewport. |
| <span id="case-X_MIN_Y_MID_MEET"></span>`X_MIN_Y_MID_MEET` | `'xMinYMid meet'` | `xMinYMid meet` - Align the `<min-x>` of the element's viewBox with the smallest X value of the viewport. |
| <span id="case-X_MIN_Y_MID_SLICE"></span>`X_MIN_Y_MID_SLICE` | `'xMinYMid slice'` | `xMinYMid slice` - Align the `<min-x>` of the element's viewBox with the smallest X value of the viewport. |
| <span id="case-X_MIN_Y_MIN"></span>`X_MIN_Y_MIN` | `'xMinYMin'` | `xMinYMin` - Align the `<min-x>` of the element's viewBox with the smallest X value of the viewport. |
| <span id="case-X_MIN_Y_MIN_MEET"></span>`X_MIN_Y_MIN_MEET` | `'xMinYMin meet'` | `xMinYMin meet` - Align the `<min-x>` of the element's viewBox with the smallest X value of the viewport. |
| <span id="case-X_MIN_Y_MIN_SLICE"></span>`X_MIN_Y_MIN_SLICE` | `'xMinYMin slice'` | `xMinYMin slice` - Align the `<min-x>` of the element's viewBox with the smallest X value of the viewport. |