NSS Docs
DiscordStoreHomepage
nss_libs
nss_libs
  • README
  • Changelog
  • UI components
    • NssUiApi basics
    • NssAudio
    • NssButton
    • NssClient
    • NssConfirm
    • NssHelper
    • NssLoadingIndicator
    • NssModal
    • NssPadLock
    • NssResponsive
    • NssSimpleTextEditor
    • NssSvgReplacer
    • NssTextBox
    • NssTip
  • Client/server modules
    • AttachProp
    • Blip
    • Character
      • Client Character
      • Server Character
    • Chunk
    • ClientEvent
    • ConfigValidator
    • Database
    • DatabaseUpdater
    • DependencyAutoRestart
    • Discord
    • EntityInRange
    • Helper
      • Client Helper
      • Server Helper
      • Shared Helper
    • Inventory
    • Keyboard
    • Notify
    • Npc
    • ParticleFxPlayer
    • PointInRange
    • Prompts
    • ServerEvent
    • VersionCheck
Powered by GitBook
On this page
  • How to use
  • ES6 module import
  • Create tip
  • Available positions

Was this helpful?

  1. UI components

NssTip

PreviousNssTextBoxNextAttachProp

Last updated 1 year ago

Was this helpful?

This component creates a tip with a title and a description. The tip is placeable at specific positions.

How to use

ES6 module import

For NssUiApi usage, please see the of the nss_libs/ui folder.

Alternative example of direct ES6 module import:

import {NssTip} from "nui://nss_libs/ui/NssTip/NssTip.js";

Create tip

import {NssTip} from "nui://nss_libs/ui/NssTip/NssTip.js";

/**
 * @type {NssTip}
 */
const tip = new NssTip('YOUR TEXT HERE');

tip
    .setDuration(5000) // After 5 seconds the tip will be hidden, default is 4000
    .setBottomRight() // Default is bottom center
    .show()

Available positions

  • setBottomCenter()

  • setBottomLeft()

  • setBottomRight()

  • setCenterCenter()

  • setCenterLeft()

  • setCenterRight()

  • setTopCenter()

  • setTopLeft()

  • setTopRight()

README.md