🚀
Maclib UI Library
  • Information
    • Welcome
    • Documentation Formatting
    • Miscellaneous
  • Getting Started
    • Loading Maclib
      • Creating a window
        • Adding a Global Setting
        • Displaying a notification
        • Prompting a dialog
        • Creating a tab group
          • Adding tabs
            • Adding sections
              • Button
              • Input
              • Slider
              • Toggle
              • Keybind
              • Colorpicker
              • Dropdown
              • Header
              • Paragraph
              • Label
              • Sub Label
              • Divider
              • Spacer
Powered by GitBook
On this page

Was this helpful?

  1. Getting Started
  2. Loading Maclib
  3. Creating a window

Displaying a notification

PreviousAdding a Global SettingNextPrompting a dialog

Last updated 7 months ago

Was this helpful?

MacLib gives you access to a built-in notification system, providing you with an easy way to display alerts and messages seamlessly within your UI.

Window:Notify({
    Title <string>
    Description <string>
    Lifetime <number>
    Scale <number>
    SizeX = <number>
    Style <string: "None", "Confirm", "Cancel"> -- The type of button that the user interacts with, input "None" for no interactable (or leave nil), input "Confirm" for a checkmark, and input "Cancel" for a crossmark.
    Callback <function(): void>
})

Functions

:UpdateTitle(<string>)
:UpdateDescription(<string>)
:Resize(<number>) -- Only X, Y is automatically determined by the content size
:Cancel()

Example

Window:Notify({
    Title = "Kuzu Hub",
    Description = "Hello, World!",
    Lifetime = 5
})