---
title: "Iframe Embed"
description: "Embed a live quote slideshow on any website using the Quote Gallery iframe widget."
canonical_url: "https://docs.quotegallery.nl/docs/guides/iframe"
---
# Iframe Embed

> Embed a live quote slideshow on any website using the Quote Gallery iframe widget.

Quote Gallery provides a hosted embed page you can drop into any website as an `<iframe>`. It renders a fully animated quote slideshow with no JavaScript required on your end.

## Quick start

```html
<iframe
  src="https://quotegallery.nl/embed?embedToken=YOUR_TOKEN"
  width="800"
  height="450"
  frameborder="0"
  allowfullscreen
></iframe>
```

Replace `YOUR_TOKEN` with a token generated in your [Embed Generator](https://quotegallery.nl/dashboard/embed-generator).

## Getting an embed token

Embed tokens let you control which quotes appear and which sites can show the embed.

1. Go to **Dashboard → Embed Generator**
2. Click **Create embed**, name it, pick a quote source (random, a category, an author, one of your playlists, or your own JSON address), set the style and list the allowed domains
3. Click **Create Embed** and copy the snippet
4. The token is the `embedToken` query parameter in its address

<callout type="info">

An embed needs no API key. Our server fetches the quotes, so the token is safe to ship in public HTML.

</callout>

## URL parameters

You can override any embed setting per-embed by appending query parameters. URL params take precedence over token defaults.

### Data source

<table>
<thead>
  <tr>
    <th>
      Parameter
    </th>
    
    <th>
      Type
    </th>
    
    <th>
      Default
    </th>
    
    <th>
      Description
    </th>
  </tr>
</thead>

<tbody>
  <tr>
    <td>
      <code>
        embedToken
      </code>
    </td>
    
    <td>
      <code>
        string
      </code>
    </td>
    
    <td>
      
    </td>
    
    <td>
      Secure token from the Embed Generator. Mutually exclusive with <code>
        quotesUrl
      </code>
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        quotesUrl
      </code>
    </td>
    
    <td>
      <code>
        string
      </code>
    </td>
    
    <td>
      
    </td>
    
    <td>
      URL of an external JSON API returning an array of quote objects
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        textField
      </code>
    </td>
    
    <td>
      <code>
        string
      </code>
    </td>
    
    <td>
      <code>
        text
      </code>
    </td>
    
    <td>
      JSON field name for quote text when using <code>
        quotesUrl
      </code>
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        authorField
      </code>
    </td>
    
    <td>
      <code>
        string
      </code>
    </td>
    
    <td>
      <code>
        author
      </code>
    </td>
    
    <td>
      JSON field name for author when using <code>
        quotesUrl
      </code>
    </td>
  </tr>
</tbody>
</table>

<callout icon="i-lucide-triangle-alert">

`quotesUrl` does not require an embed token, but your external API must return valid JSON and allow cross-origin requests (CORS).

</callout>

### Appearance

<table>
<thead>
  <tr>
    <th>
      Parameter
    </th>
    
    <th>
      Type
    </th>
    
    <th>
      Default
    </th>
    
    <th>
      Description
    </th>
  </tr>
</thead>

<tbody>
  <tr>
    <td>
      <code>
        bgType
      </code>
    </td>
    
    <td>
      <code>
        string
      </code>
    </td>
    
    <td>
      <code>
        solid
      </code>
    </td>
    
    <td>
      Background type (<code>
        solid
      </code>
      
       for a flat color)
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        bgColor
      </code>
    </td>
    
    <td>
      <code>
        string
      </code>
    </td>
    
    <td>
      <code>
        #000000
      </code>
    </td>
    
    <td>
      Background color as a hex value (include <code>
        #
      </code>
      
      )
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        textColor
      </code>
    </td>
    
    <td>
      <code>
        string
      </code>
    </td>
    
    <td>
      <code>
        #ffffff
      </code>
    </td>
    
    <td>
      Quote text color
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        authorColor
      </code>
    </td>
    
    <td>
      <code>
        string
      </code>
    </td>
    
    <td>
      <code>
        #999999
      </code>
    </td>
    
    <td>
      Author name color
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        font
      </code>
    </td>
    
    <td>
      <code>
        string
      </code>
    </td>
    
    <td>
      (system)
    </td>
    
    <td>
      Font name for both quote and author text
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        autoSize
      </code>
    </td>
    
    <td>
      <code>
        boolean
      </code>
    </td>
    
    <td>
      <code>
        true
      </code>
    </td>
    
    <td>
      Scale quote text to fit the container
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        showAuthor
      </code>
    </td>
    
    <td>
      <code>
        boolean
      </code>
    </td>
    
    <td>
      <code>
        true
      </code>
    </td>
    
    <td>
      Show or hide the author name
    </td>
  </tr>
</tbody>
</table>

### Playback

<table>
<thead>
  <tr>
    <th>
      Parameter
    </th>
    
    <th>
      Type
    </th>
    
    <th>
      Default
    </th>
    
    <th>
      Description
    </th>
  </tr>
</thead>

<tbody>
  <tr>
    <td>
      <code>
        quoteInterval
      </code>
    </td>
    
    <td>
      <code>
        number
      </code>
    </td>
    
    <td>
      <code>
        10
      </code>
    </td>
    
    <td>
      Seconds each quote is displayed (at least 2)
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        transition
      </code>
    </td>
    
    <td>
      <code>
        string
      </code>
    </td>
    
    <td>
      <code>
        blur-scale
      </code>
    </td>
    
    <td>
      Transition animation between quotes
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        showProgress
      </code>
    </td>
    
    <td>
      <code>
        boolean
      </code>
    </td>
    
    <td>
      <code>
        false
      </code>
    </td>
    
    <td>
      Show a countdown progress indicator
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        controls
      </code>
    </td>
    
    <td>
      <code>
        boolean
      </code>
    </td>
    
    <td>
      <code>
        true
      </code>
    </td>
    
    <td>
      Show previous, next, and pause controls
    </td>
  </tr>
</tbody>
</table>

## Examples

### Custom colors, no controls

```html
<iframe
  src="https://quotegallery.nl/embed?embedToken=YOUR_TOKEN&bgColor=%23181818&textColor=%23f5f5f0&authorColor=%23e08c2b&controls=false"
  width="100%"
  height="300"
  frameborder="0"
></iframe>
```

<callout type="tip">

URL-encode `#` as `%23` when building embed URLs by hand. Most templating engines handle this automatically.

</callout>

### Slow rotation with progress bar

```html
<iframe
  src="https://quotegallery.nl/embed?embedToken=YOUR_TOKEN&quoteInterval=30&showProgress=true"
  width="800"
  height="450"
  frameborder="0"
></iframe>
```

### External quote API (no token)

```html
<iframe
  src="https://quotegallery.nl/embed?quotesUrl=https%3A%2F%2Fapi.example.com%2Fquotes&textField=body&authorField=name"
  width="800"
  height="450"
  frameborder="0"
></iframe>
```

The external API should return either a plain array `[{ body: "...", name: "..." }]` or an object with a top-level array key (`data`, `quotes`, or `results`).

## Responsive sizing

Use percentage widths and `aspect-ratio` to make the embed fluid:

```html
<div style="position: relative; width: 100%; aspect-ratio: 16/9; border-radius: 12px; overflow: hidden;">
  <iframe
    src="https://quotegallery.nl/embed?embedToken=YOUR_TOKEN"
    style="position: absolute; inset: 0; width: 100%; height: 100%; border: none;"
    allowfullscreen
  ></iframe>
</div>
```

## Domain restrictions

When creating an embed token you can restrict it to specific domains and their subdomains. The browser then refuses to show the embed on any other site. It keeps casual copying out, but it is not a lock. Leave the list empty to allow every site.

To test on your own machine, leave the list empty: `localhost` is not accepted as a domain.

## Privacy when embedding

- The embed is served from quotegallery.nl, so each visitor’s browser connects to our servers and we receive their IP address and the usual request headers. See our [Privacy Policy](https://quotegallery.nl/privacy).
- If the embed uses a custom font (the `font` parameter, or a font chosen in the Embed Generator), the visitor’s browser may load it from a third-party font provider (Bunny Fonts, Fontshare or Google Fonts), which then receives their IP address. Leave the font unset to avoid this.
- With `quotesUrl`, the visitor’s browser also requests your external API directly.
- The embed is a page of quotegallery.nl, so loading it counts as a page view in Umami, our analytics tool, which sets no cookies.

Mention this in your own privacy notice if the page you embed it on needs one.

## Embed Generator

The [Embed Generator](https://quotegallery.nl/dashboard/embed-generator) in your dashboard builds the `<iframe>` snippet for you. Use it to pick a quote source, style colors and fonts, set rotation speed, restrict domains, and copy the final tag ready to paste.


## Sitemap

See the full [sitemap](https://docs.quotegallery.nl/sitemap.md) for all pages.
