This package has been deprecated

Author message:

Package no longer supported. Contact Support at https://www.npmjs.com/support for more info.

vue-json-to-html

0.1.12 • Public • Published

vue-json-to-html

Status: beta

👅 Vue component for generating equal HTML from Json/JS-Object

Table of contents

Usage

Install component to your project:

npm install vue-json-to-html
yarn add vue-json-to-html

Import and include to Vue Instance installed component:

import JsonToHtml from 'vue-json-to-html'

export default {
  components: {
    JsonToHtml
  }
  ...
}

Use component in template:

<template>
  <div id="content">
    <JsonToHtml :json="json" :bem="true" rootClassName="wrapper" rootTagName="section" :inheritClassName="false"/>
  </div>
</template>

Component props

Prop Type Default Description
json Json(JS Object) required DOM will rendered such as object structure. Each elements will have necessary classNames from json keys.
bem Boolean false Generate classNames with BEM methodology.
inheritClassName Boolean true Generate classNames with inherited parent class name. For using BEM must be a true.
bem Boolean false Generate classNames with BEM methodology.
rootClassName String undefined ClassName for root element in <JsonToHtml/>, using for inherited parent class name from root element
rootTagName String 'div' TagName for root element in <JsonToHtml/>.

Readme

Keywords

none

Package Sidebar

Install

npm i vue-json-to-html

Weekly Downloads

9

Version

0.1.12

License

none

Unpacked Size

105 kB

Total Files

7

Last publish

Collaborators

  • serchiichuk