Interactables

Interactables is a Javascript framework that allows you to interact with html elements.

You can move, resize, dock & undock elements according to the class names you give them. Resize or move the red square below, which is an element with classname 'moveable' and 'resizable'.


Elements


Moveables

To Use:

Resizables

To Use:

Slidables

This is a slidable container. To use it:

Dockables

When you switch between docked and undocked, the element's position switches between relative and absolute. If the container element id is found, resizable.js switches the element's node between the body and container node.

To Use:

Dockable #2

This is another dockable. Add as many as you like. Double click the icon to dock or undock it.

Setup Framework

To use Interactables:

  1. On your html document, classify elements as one or more of the interactable class names.
  2. Load interactable.js when the html document loads.
  3. Run Interactable() function when the html document lodas, or as desired, including optional parameters.

CSS Styling

When an element is interacted with, the box-shadow styling is changed. Interactable elements use an 'active' and 'passive' to show when the element is being interacted with.
You can easily adjust the box-shadow when you call the Interactable() function. For example, to make things red, call Interactable('0px 0px 20px 4px red', '0px 0px 1px 1px red') with the styling parameters desired.

Styles Modified

In order to show the elements, this script modifies the following css attributes.

Function Parameters

The function syntax is:
Interactable([box-shadow-active],[box-shadow-passive])

Interactables

Dockable Element

Double click the icon to dock or undock this element.