videoask-elements
TypeScript icon, indicating that this package has built-in type declarations

0.2.4 • Public • Published

videoask-elements

npm version

Custom elements for easy use of VideoAsk

Table of Contents

Downloading VideoAsk Elements

You can install VideoAsk Elements via npm:

npm install videoask-elements

Or you can use VideoAsk Elements via CDN:

<script src="https://unpkg.com/videoask-elements/videoask-elements.js"></script>

If you do use this library from NPM be sure to import it somewhere in your JS code:

import 'videoask-elements';
 
// or
 
export { /* Whatever component(s) you want */ } from 'videoask-elements';

Elements

VideoAskEmbed (<videoask-embed>)

Embed your VideoAsk inside a webpage on your website.

CDN

You can use the embed element via CDN without needing to import all of the VideoAsk Elements.

<script src="https://unpkg.com/videoask-elements/embed.js"></script>

Usage

<videoask-embed url="{videoask_url}"></videoask-embed>

Example

<videoask-embed url="https://www.videoask.com/f5btkeaio"></videoask-embed>

Attributes

Attribute Required Description Type Default
url true URL of VideoAsk String null
height false Height of form. Accepts size in %, cm, em, ex, in, mm, pc, p, px, vh, or vw. String "500px"
width false Width of form. Accepts size in %, cm, em, ex, in, mm, pc, p, px, vh, or vw. String "100%"

Events

Type Description Element Type
render Event listener that returns the native VideoAsk element. HTMLIFrameElement

VideoAskWidget (<videoask-widget>)

Grab the attention of your website visitors by using our Widget.

CDN

You can use the widget element via CDN without needing to import all of the VideoAsk Elements.

<script src="https://unpkg.com/videoask-elements/widget.js"></script>

Usage

<videoask-widget url="{videoask_url}"></videoask-widget>

Example

<videoask-widget url="https://www.videoask.com/f5btkeaio"></videoask-widget>

Attributes

Attribute Required Description Type Default
url true URL of VideoAsk String null
type false Type of widget. Accepts VideoThumbnailLarge, VideoThumbnailSmall, CustomEmoji String "VideoThumbnailLarge"
text false Text to appear in VideoAsk button String "Talk to me"
color false Hex color for VideoAsk button String "#4E2AB9"
position false Position to display widget. Accepts bottom-left, bottom-right String "bottom-right"
emoji false Emoji to display when type is set to CustomEmoji String "👋"

Events

Type Description Element Type
render Event listener that returns the native VideoAsk element. HTMLButtonElement

Contributing

All code should pass tests, as well as be well documented. Please open PRs into the dev branch. Please also see the Commit Message Guidelines for how commit messages should be structured.

Package Sidebar

Install

npm i videoask-elements

Weekly Downloads

53

Version

0.2.4

License

MIT

Unpacked Size

318 kB

Total Files

15

Last publish

Collaborators

  • michaelsolati