An open API service indexing awesome lists of open source software.

https://github.com/1000ch/fluid-iframe

Web Components which provides fluid width <iframe>.
https://github.com/1000ch/fluid-iframe

iframe web-components

Last synced: 8 months ago
JSON representation

Web Components which provides fluid width <iframe>.

Awesome Lists containing this project

README

          

# fluid-iframe ![GitHub Actions Status](https://github.com/1000ch/fluid-iframe/workflows/test/badge.svg)

> Web Components which provides fluid width ``.

## Install

Using [npm](https://www.npmjs.org/package/fluid-iframe):

```sh
$ npm install fluid-iframe
```

## Usage

Import `FluidIframe` and register it as a custom element.

```html

import FluidIframe from 'https://unpkg.com/fluid-iframe';

customElements.define('fluid-iframe', FluidIframe);

```

Put ``.

```html

```

## API

### `src` attribute

URL string which will be set as ``.

### `title` attribute

Title string which will be set as ``.

### `aspect` attribute

`x/y` format string will be calculated for aspect ratio. Default value is `16/9`.

## License

[MIT](https://1000ch.mit-license.org) © [Shogo Sensui](https://github.com/1000ch)