fluid-iframe
TypeScript icon, indicating that this package has built-in type declarations

1.0.0 • Public • Published

<fluid-iframe>

Web Components which provides fluid width <iframe>.

Build Status NPM version devDependency Status

Install

Using npm:

$ npm install fluid-iframe

Usage

Import FluidIframe and register it as a custom element.

<script type="module">
import FluidIframe from 'https://unpkg.com/fluid-iframe';
 
customElements.define('fluid-iframe', FluidIframe);
</script> 

Put <fluid-iframe>.

<fluid-iframe
  src="https://www.youtube.com/embed/EqNHSrHzSOU"
  title="Santa Tracker: Out Like A Light"
  aspect="16/9">
</fluid-iframe>

API

src attribute

URL string which will be set as <iframe src>.

title attribute

Title string which will be set as <iframe title>.

aspect attribute

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

License

MIT © Shogo Sensui

/fluid-iframe/

    Package Sidebar

    Install

    npm i fluid-iframe

    Weekly Downloads

    12

    Version

    1.0.0

    License

    MIT

    Unpacked Size

    13.4 kB

    Total Files

    11

    Last publish

    Collaborators

    • 1000ch