Button setsSYSTEM SETSHARING SETNAVIGATION SETCLOSING SETRETENTION SETCONTACT SET Pricing and contactPRICING EMAIL US ContentBUTTON LIBRARYDISPLAY CODESSITE PACKSAI PROMPTSREADINSTALL GUIDE LanguageTIẾNG VIỆTENGLISH VIEN PRICING

Home / Guide

Installation guide

Install in two steps

  1. Upload nut-<name>.js from the package to your site (for example the /nut/ folder).
  2. Paste one script line and put the tag where the button should appear:
<script defer src="/nut/nut-sao-chep-link.js"></script>
<nut-sao-chep-link></nut-sao-chep-link>

If you bought a whole set, loading the single bo-<name>.js file gives you every button in it.

Shared attributes

Attribute names are Vietnamese keywords and work the same on any site.

AttributeMeaningExample
mauButton background, set it to your brand colormau="#e8590c"
mau-chuText and icon colormau-chu="#fff"
nhanButton textnhan="SEND TO A FRIEND"
kieuicon = 44px round icon only · vien = outline buttonkieu="icon"
rongFull-width buttonrong
ghi-luotPath to the PHP file that logs clicksghi-luot="/ghi-luot.php"

Language

Button text, messages and dialogs follow the page language: English on <html lang="en">, Vietnamese on <html lang="vi">. To force one:

<script>window.KHO_NUT_CAU_HINH = { ngonNgu: 'en' };</script>

Buttons with a server part

Buttons that store data (VISITORS, GET ADVICE ON ZALO…) ship with a PHP file. Upload it and point the button's attribute at it (nguon, gui-ve). Data is written to a private file on your own hosting.

Turn buttons on and off in one place

<script>window.KHO_NUT_TAT = ['chia-se-facebook', 'chat-zalo'];</script>

Put this before the button script (for example in a shared header). Buttons named in the list hide themselves site-wide.

Know which button gets tapped

Every tap fires a nut-bam event you can forward to your analytics:

<script>
document.addEventListener('nut-bam', function (e) {
  console.log('Button tapped', e.detail.nut);
});
</script>

Notes

  • Do not place buttons inside an element with transform or filter; the button's dialog may be misplaced.
  • Load the script with defer so buttons never slow the page.
Share this:

BROWSE BUTTONS