Skip to content

dekujs/magic-virtual-element

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

25 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

magic-virtual-element

version js-standard-style

A library for building virtual tree elements, with enhanced support for class and style properties.

npm install magic-virtual-element

You can also use Duo, Bower or download the files manually.

Top-Level API

element(component: string|Function , [props: object], [...children: Array]): Component

Example

import element from 'magic-virtual-element';

let divStyle = {
  color: 'white',
  backgroundImage: 'url(' + imgUrl + ')',
  WebkitTransition: 'all', // note the capital 'W' here
  msTransition: 'all' // 'ms' is the only lowercase vendor prefix
};

element('div', { class: ["App", "foo", "bar"], style: divStyle }, [
  element('button', { class: "Button" }, 'Click Me!')
]);

See https://github.com/dekujs/deku#virtual-elements

About

Build virtual tree elements with magic attributes

Resources

Stars

Watchers

Forks

Packages

No packages published

Contributors 4

  •  
  •  
  •  
  •