---
title: "Portal"
description: "VFX composition block"
---
import { InstallCommand } from "/snippets/install-command.jsx";
## Install
That writes one file: `compositions/vfx-portal.html`.
Live preview needs the `chrome://flags/#canvas-draw-element` flag switched on.
Without it this item's screen renders black. Rendering from the CLI switches
it on for you. [How it works](/guides/html-in-canvas)
## Change the colors
Set these CSS variables on the block:
- `--bg-color` — Background. Defaults to `#000000`.
- `--portal-color` — Portal color. Defaults to `#fafafa`.
## Source
```html
HTML Portal Transition
HTML-in-Canvas Required
This composition requires the experimental CanvasDrawElement API. Enable it in Chrome or
Brave:
chrome://flags/#canvas-draw-element
```
## Usage
After installing, add the block to your host composition:
```html
```
{/* hf:generated-footer */}
Tagged `html-in-canvas` `webgl`.
## Related topics
- [Browse the complete Catalog](/catalog)
- [Add assets and Catalog items in Studio](/studio/assets-and-blocks)
- [Build a richer composition](/go-further)