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>.
- Host: GitHub
- URL: https://github.com/1000ch/fluid-iframe
- Owner: 1000ch
- License: mit
- Created: 2020-01-01T12:58:57.000Z (over 6 years ago)
- Default Branch: main
- Last Pushed: 2023-03-04T05:33:46.000Z (over 3 years ago)
- Last Synced: 2024-10-03T21:37:25.642Z (over 1 year ago)
- Topics: iframe, web-components
- Language: HTML
- Homepage: https://1000ch.github.io/fluid-iframe/
- Size: 433 KB
- Stars: 2
- Watchers: 3
- Forks: 1
- Open Issues: 3
-
Metadata Files:
- Readme: readme.md
- License: license
Awesome Lists containing this project
README
# fluid-iframe 
> 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)