# FitMode

Type alias · category: Types

Source: https://github.com/playcanvas/web-components/blob/b95efbfac5c64c11284a27e8e18224700d05fc77/src/components/element-component.ts#L15

How an image element fits its texture or sprite into its rectangle: `stretch` fills the rectangle
exactly, `contain` fits within it and `cover` fills it, both preserving the source aspect ratio.

```ts
type FitMode = "stretch" | "contain" | "cover"
```
