Socket
Socket
Sign inDemoInstall

magic-virtual-element

Package Overview
Dependencies
14
Maintainers
2
Versions
7
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    magic-virtual-element

Build virtual tree elements with magic attributes


Version published
Maintainers
2
Install size
1.15 MB
Created

Readme

Source

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

FAQs

Last updated on 11 Feb 2016

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc