# Overflow

Overflow utilities allow to control the content [overflow](<https://developer.mozilla.org/en-US/docs/Web/CSS/overflow>) behavior. Choose the appropriate class:

- `overflow-auto`
- `overflow-hidden`
- `overflow-visible`
- `overflow-scroll`
- `overflow-clip`

These classes apply the specified overflow behavior to an element, but are not responsive by default.

```
<div class="overflow-auto">...</div>
<div class="overflow-hidden">...</div>
<div class="overflow-visible">...</div>
<div class="overflow-scroll">...</div>
<div class="overflow-clip">...</div>
```

#### Example

Component:

```typescript
/**
 * Copyright (c) Siemens 2016 - 2026
 * SPDX-License-Identifier: MIT
 */
import { Component } from '@angular/core';

@Component({
  selector: 'app-sample',
  templateUrl: './overflow.html',
  styles: `
    :host {
      div {
        padding: 0.5rem;
        margin: 0.5rem;
        max-inline-size: 200px;
        max-block-size: 80px;
        background-color: var(--si-sys-color-background-1);
      }
    }
  `,
  host: {
    class: 'p-5 d-flex gap-4'
  }
})
export class SampleComponent {}
```

Template:

```html
<div class="overflow-auto">
  <p>
    This demonstrates the use of
    <a href="https://developer.mozilla.org/en-US/docs/Web/CSS/overflow">.overflow-auto</a> on an
    element. When the content exceeds the container's size, vertical scrolling is enabled
    automatically.
  </p>
</div>
<div class="overflow-hidden">
  <p>
    This example demonstrates the use of
    <a href="https://developer.mozilla.org/en-US/docs/Web/CSS/overflow">.overflow-hidden</a>. Any
    content that exceeds the container's specified width or height will be clipped and not visible.
  </p>
</div>
<div class="overflow-visible">
  <p>
    This example shows the use of
    <a href="https://developer.mozilla.org/en-US/docs/Web/CSS/overflow">.overflow-visible</a>. When
    content exceeds the container's boundaries, it remains visible and is not clipped or hidden.
  </p>
</div>
<div class="overflow-scroll">
  <p>
    This example demonstrates the use of
    <a href="https://developer.mozilla.org/en-US/docs/Web/CSS/overflow">.overflow-scroll</a>. When
    the content exceeds the width or height of the container, scrollbars are always visible,
    allowing users to scroll and view the hidden content.
  </p>
</div>
<div class="overflow-clip">
  <p>
    This example demonstrates the use of
    <a href="https://developer.mozilla.org/en-US/docs/Web/CSS/overflow">.overflow-clip</a>. Content
    outside the container is clipped without creating a scroll container.
  </p>
</div>
```
