# TransparentBackground — SvelteKit UI

Package: sveltekit-ui 1.1.94

Page: https://www.sveltekit-ui.com/components/transparent_background

Category: Foundations

A component that renders a dynamic grid-based transparent background, with alternating colors for squares, behind the provided content.

Public component import: `TransparentBackground`

## Usage

```svelte
<script>
  // Import the shared stylesheet once in your application's root layout.
  import "sveltekit-ui/style.css"
  import { TransparentBackground } from "sveltekit-ui"
</script>

<TransparentBackground>
  {#snippet content()}
    <div style="width: 24rem; height: 14rem; border-radius: 1rem; background: #0ea5e980; display: grid; place-items: center;">
      50% transparent blue
    </div>
  {/snippet}
</TransparentBackground>
```

## Properties

### `min_square_width`

- type: number
- default: 10
- description: The minimum width of each square in pixels.

### `max_square_width`

- type: number
- default: 25
- description: The maximum width of each square in pixels.

### `min_squares_per_row`

- type: number
- default: 2
- description: The minimum number of squares per row.

### `content`

- type: snippet
- description: The content to be displayed in the foreground while the background grid renders behind it.
