1.0.69 • Published 4 years ago

vff-controllers v1.0.69

Weekly downloads
-
License
MIT
Repository
-
Last release
4 years ago

Table of contents

Videoflow Controllers Library

This library provides HTML components and Layout helper classes that will allow you to create your Videoflow controllers out of the box.

Videoflow Controllers

Videflow controllers allow you to manage your visual engagement data in most intuitive way. Controllers are HTML elements and can be simply used inside you're HTML. Please note, VFF controllers are Custom Elements and can not be self closing tags. The proper way of using a component is by always writing the opening and the closing tag:

    <vff-custom-component></vff-custom-component>

Loading dependencies

Javascript
<script type="module" src="https://unpkg.com/vff-controllers/dist/vff-controller/vff-controller.esm.js"></script>
<script nomodule="" src="https://unpkg.com/vff-controllers/dist/vff-controller/vff-controller.js"></script>
CSS
<link rel="stylesheet" href="https://unpkg.com/vff-controllers/dist/vff-controller/vff-controller.css"/>

Starter Template

<!DOCTYPE html>
<html dir="ltr" lang="en">
<head>
  <meta charset="utf-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=5.0">
  <title>Videflow Controllers Starter</title>

  <!-- Videoflow CSS  -->
  <link rel="stylesheet" href="https://unpkg.com/vff-controllers/dist/vff-controller/vff-controller.css"/>

  <!-- Videoflow Controllers  -->
  <script type="module" src="https://unpkg.com/vff-controllers/dist/vff-controller/vff-controller.esm.js"></script>
  <script nomodule="" src="https://unpkg.com/vff-controllers/dist/vff-controller/vff-controller.js"></script>
</head>
<body>
    <vff-tabs default="section1">
      <vff-tab for="section1">First</vff-tab>
      <vff-tab for="section2">Second</vff-tab>
      <vff-tab for="section3">Third</vff-tab>
    </vff-tabs>
    
    <div id="section1" class="ctrl-container">
        <div class="ctrl-container-row">[YOUR HTML HERE]</div>
    </div>
    <div id="section2" class="ctrl-container">
        <div class="ctrl-container-row">[YOUR HTML HERE]</div>
    </div>
    <div id="section3" class="ctrl-container">
        <div class="ctrl-container-row">[YOUR HTML HERE]</div>
    </div>
</body>
</html>

How to use this library

Basic Layout

A section must have a ctrl-container class html<div id="section1" class="ctrl-container"> This is needed in order to control section visibility and give a section the initial CSS it needs. Each direct descendant of a ctrl-container must have in ctrl-container-row class.

<div id="section1" class="ctrl-container">
    <div class="ctrl-container-row">[YOUR HTML HERE]</div>
</div>
Tabs

Tabs used to control section visibility. Each tab has a for attribute : html<vff-tab for="section_id">. This attribute specifies which content section a tab is bound to.

<vff-tabs>
    <vff-tab for="section1">First</vff-tab>
</vff-tabs>
Sections

Sections used to visually divide controllers, each section holds controllers needed for a specific engagement screen. In order to allow a section to be bound to a tab it must have the same id=section_id as the tab.

<div id="section1" class="ctrl-container"></div>
Classes
.ctrl-container
.ctrl-container-row
.ctrl-container-block

Using Controllers

Common events that each component fires in different stages of it's life cycle:

Common events that each component listens to:

Available Controllers

After setting up the basic layout, you can start declaring which controllers your layout will include.

vff-checkbox:
    <vff-checkbox>You can have you're text here!</vff-checkbox>

Properties

vff-radio-button:
    <vff-radio-button name="radio-group">Radio1</vff-radio-button>
    <vff-radio-button name="radio-group">Radio2</vff-radio-button>
    <vff-radio-button name="radio-group">Radio3</vff-radio-button>

Properties

vff-image-browser:
    <vff-image-browser></vff-image-browser>

Properties

Methods

vff-color-picker:
    <vff-color-picker></vff-color-picker>

Properties

vff-select:
    <vff-select></vff-select>

Interfaces

Properties:

PropertyTypeDescription
optionsSelectItemSelectItem[]Sets or returns all available options
multiplebooleanEnables multiple selection
valueSelectItem[]Sets or returns selected options

Important: When setting the options, the key must be a unique value to avoid unexpected behaviour.

vff-text:
    <vff-text></vff-text>

Properties:

PropertyTypeDescription
multilinebooleanDefines a multi-line text input control
placeholderstringSpecifies a short hint that describes the expected value of a text area
valuestringSets or returns the contents of a text area
vff-range:
    <vff-range></vff-range>

Properties:

PropertyTypeDescription
maxnumberSets or returns the maximum value allowed
minnumberSets or returns the minimum value allowed
stepnumberSets or returns the number of intervals of a slider control
valuenumberSets or returns the value of a slider control
vff-video-time:
    <vff-video-time></vff-video-time>

Properties:

PropertyTypeDescription
valuenumberSets or returns the value in seconds.
1.0.69

4 years ago

1.0.66

4 years ago

1.0.65

4 years ago

1.0.64

4 years ago

1.0.68

4 years ago

1.0.67

4 years ago

1.0.63

4 years ago

1.0.62

4 years ago

1.0.61

4 years ago

1.0.60

4 years ago

1.0.59

4 years ago

1.0.58

4 years ago

1.0.55

4 years ago

1.0.57

4 years ago

1.0.56

4 years ago

1.0.44

4 years ago

1.0.43

4 years ago

1.0.42

4 years ago

1.0.41

4 years ago

1.0.48

4 years ago

1.0.47

4 years ago

1.0.46

4 years ago

1.0.45

4 years ago

1.0.49

4 years ago

1.0.51

4 years ago

1.0.50

4 years ago

1.0.54

4 years ago

1.0.53

4 years ago

1.0.52

4 years ago

1.0.40

4 years ago

1.0.39

4 years ago

1.0.38

4 years ago

1.0.37

4 years ago

1.0.36

4 years ago

1.0.35

4 years ago

1.0.34

4 years ago

1.0.33

4 years ago

1.0.32

4 years ago

1.0.31

4 years ago

1.0.30

4 years ago

1.0.29

4 years ago

1.0.28

4 years ago

1.0.27

4 years ago

1.0.26

4 years ago

1.0.25

4 years ago

1.0.24

4 years ago

1.0.23

4 years ago

1.0.22

4 years ago

1.0.21

4 years ago

1.0.19

4 years ago

1.0.20

4 years ago

1.0.18

4 years ago

1.0.17

4 years ago

1.0.16

4 years ago

1.0.15

4 years ago

1.0.9

4 years ago

1.0.8

4 years ago

1.0.11

4 years ago

1.0.10

4 years ago

1.0.74

4 years ago

1.0.14

4 years ago

1.0.13

4 years ago

1.0.12

4 years ago

1.0.73

4 years ago

1.0.72

4 years ago

1.0.71

4 years ago

1.0.7

4 years ago

1.0.6

4 years ago

1.0.5

4 years ago

1.0.4

4 years ago

1.0.3

4 years ago

1.0.2

4 years ago

1.0.1

4 years ago

1.0.0

4 years ago