New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

kokk

Package Overview
Dependencies
Maintainers
1
Versions
31
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

kokk

A beautiful way to display a demo and the usage from markdown.

  • 0.0.3
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
170
decreased by-17.07%
Maintainers
1
Weekly downloads
 
Created
Source

kokk

NPM version NPM downloads CircleCI

A beautiful way to display a demo and the usage from markdown.

The design is inspired by Ant Design! I like the elegant design to display a demo.

The name is inspired by Kokkoku 💃

Install

yarn add kokk --save

CDN: UNPKG | jsDelivr (available as window.kokk)

Usage

<template>
  <div id="app">
    <kokk>
      <span slot="demo">meow (ฅ>ω<*ฅ)</span>
    </kokk>
  </div>
</template>

<script>
import kokk from 'kokk'

export default {
  components: {
    kokk
  }
}
</script>

Options

title

Type: string
Default: Basic

The title of the demo.

desc

Type: string
Default: Basic

The title of the demo.

expandAll

Type: boolean
Default: false

The title of the demo.

highlight

Type: boolean function
Default: true

Whether to highlight code blocks, you can supply a function to customize this, use prismjs to highlight code by default.

function highlight(code, lang) {}

root

Type: string
Default: ./

The relative path of the markdown file.

doc

Type: string
Default: demo.md

The name markdown file.

Slot

Import the package which you want to show and use it as a slot.

Here is a simple example:

<template>
  <div id="app">
    <kokk root="./docs/">
      <star-rate slot="demo" :value="3"
                 type="star1"/>
    </kokk>
  </div>
</template>

<script>
import kokk from '../src'
import StarRate from 'vue-cute-rate'

export default {
  components: {
    kokk,
    StarRate
  }
}
</script>

License

MIT © luyilin

minemine.cc · GitHub @luyilin · Twitter @luyilin12

FAQs

Package last updated on 21 Feb 2018

Did you know?

Socket

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
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc