Sign Up for Free

RunKit +

Try any Node.js package right in your browser

This is a playground to test code. It runs a full Node.js environment and already has all of npm’s 400,000 packages pre-installed, including minivaline with all npm packages installed. Try it out:

var minivaline = require("minivaline")

This service is provided by RunKit and is not affiliated with npm, Inc or the package authors.

minivaline v3.1.5

A simple and minimalist comment system based on Leancloud.

This is MiniValine version 3.x

version NPM GPL Licence npm downloads gzip-size FOSSA Status

Build Status Build Status Mergify Status codecov Codacy Badge DeepScan grade

MiniValine is a simple and minimalist comment system based on Leancloud

Live Demo

Awesome MiniValine

MiniValine FAQs



Two ways.

  • links
<script src=""></script>

<!-- or -->

<script src=""></script>

<!-- or -->

<script src=""></script>
  • npm install
# Install minivaline
npm install minivaline --save
// Use import
import MiniValine from 'minivaline';
// or Use require
const MiniValine = require('minivaline');

new MiniValine({
    // other config

Get App ID/App Key

Get App ID/App Key from LeanCloud
Click here to register or login in LeanCloud.
Click here Create new application in LeanCloud, and you will get appId/appKey.


<!DOCTYPE html>
<html lang="en">
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>MiniValine - A simple comment system based on Leancloud.</title>
    <!--Load js and insert it before </ body>-->
    <script src=""></script>
    <div class="comment"></div>
      new MiniValine({
          el: '.comment',
          appId: 'Your App ID',
          appKey: 'Your Key',
          placeholder: 'Write a Comment O(∩_∩)O~~'


Base Options

  • el String

    Required. [object HTMLDivElement]

  • appId String

    Required. Your App ID

  • appKey String

    Required. Your App Key

  • placeholder String

    Input Placeholder

  • pathname String

    Default: location.pathname

    The pathname of the page.

  • math Boolean

    Default: true


    • false Close MathJax.
    • true Support MathJax@3 initialization.

    The above is the initialization operation of integrating MathJax in MiniValine. If MathJax is loaded on the page, MiniValine will use the MathJax version on the page.

  • md Boolean

    Default: true

    Support Markdown.

  • dark Boolean

    Default: false

    Dark model.

  • lang String

    Default: navigator.language || navigator.userLanguage.

    Localization language key, en and zh-CN are currently available.

    More i18n info: minivaline-i18n

    How to Add or Improve translation?

  • emoticonUrl String Array

    Default: ['','','','','','']

    Expression Url.

    How to customize emoticons?

  • NoRecordIP Boolean

    Default: false

    Do not record commenter IP.

  • maxNest Number

    Default: 6

    Sub-comment maximum nesting depth.

  • pageSize Number

    Default: 6

    Pagination size.

  • enableQQ Boolean

    Default: false

    Enable QQ avatar API.

  • visitor Boolean

    Default: true

    Only article reading access statisticsand whole site access statistics are provided. For other functions, please set it to "false" and configure MiniValine Counterby yourself.

    MiniValine Counter

  • serverURLs String

    Default: http[s]://[tab/us]

    This configuration is suitable for domestic custom domain name users, the overseas version will be automatically detected (no need to fill in manually).

  • barrager Number

    Default: 1


    • 0 Close Comment barrage.
    • 1 Load a round of Comment barrage.
    • 2 Load all round of Comment barrage

    Comment barrage. [Load only when the page is first loaded]

  • role String

    Default: admin

    Write permissions for the administrator role.

    Valine-Android Valine-iOS

Mode Options

  • mode String

    Default: DesertsP


    • DesertsP DesertsP Style mode.
    • xCss xCss Style mode.

DesertsP Style mode Options

visitor flag
  • adminEmailMd5 String

    The MD5 of Admin Email to show Admin Flag.

xCss Style mode Options

visitor flag
  • closeFlag Boolean

    Default: false

    Turn off visitor flag.

Visitor Flag Local Options
  • master String Array

    Default: []

    The MD5 String Array of master Email to show master Flag.

  • friends String Array

    Default: []

    The MD5 String Array of friends Email to show friends Flag.

  • tagMeta String Array

    Default: []

    The String Array of Words to show Flag (only three).

    For Example: tagMeta: ["Master", "Friend", "Visitor"]

Visitor Flag Cloud Option
xCss Style mode Others Options
  • region Boolean

    Default: false

    According to IP output area.

    Note: Currently only Chinese API is available. NoRecordIP: false.

  • closeUA Boolean

    Default: false

    Turn off UA detection.


  • Extraction from the core library to reduce volume.

  • Project engineering

  • Component modularity

  • And more.



  • This project is always open source and free.
  • This project does not have any competitive relationship with any other project.
  • This project is a collection of inspiration from the Valine family. Thanks to every developer for their inspiration and contribution.
  • The project is open source only for sharing, developers are not obliged to provide after-sales service.


We welcome you to join the development of MiniValine. Please see contributing document. 🤗

Also, we welcome Issue or PR to MiniValine.


Code Contributors

This project exists thanks to all the people who contribute.



Tribute to excellent open source! Tribute to excellent sharers!

Tribute to @xCss and @DesertsP!

Powered by MathJax



FOSSA Status

RunKit is a free, in-browser JavaScript dev environment for prototyping Node.js code, with every npm package installed. Sign up to share your code.
Sign Up for Free