Nighty Docs
  • About Nighty
  • Getting Started
    • First Launch
    • Usage Guide
  • Custom Scripts
    • Scripting Reference
  • 🛠️Troubleshooting
    • The application did not respond / Unknown Integration
    • Common solutions to all issues
    • Unable to launch
    • App is just a white box, UI not appearing / looking weird
    • Retrieving License Key
    • Flagged key
    • Rich Presence doesn't show up
  • UI SCRIPTING
    • API Reference
      • Tab
      • CardContainer
      • Card
      • Group
      • UI Elements
        • Text
        • Button
        • Input
        • Image
        • Toggle
        • Select
        • Checkbox
        • Table
Powered by GitBook
On this page
  • Shared Attributes & Parameters
  • Gap
  • Margin
  • Visible

Was this helpful?

  1. UI SCRIPTING

API Reference

PreviousRich Presence doesn't show upNextTab

Last updated 13 days ago

Was this helpful?

This documentation is a work in progress. UI scripting is a new feature, and additional content is still being added.

UI Scripting allows you to use the Nighty scripting engine to write Python scripts that dynamically update Nighty's user interface.

To get started, navigate to the section.


Note: The content below is dynamic, meaning you'll be directed here from other sections of the documentation when specific attributes or parameters are referenced.

Shared Attributes & Parameters

A collection of commonly used properties that apply to multiple UI components, ensuring consistent styling and behavior across your layouts.

Gap

Sets the spacing between child elements. Accepts a value from 0 to 10, where 0 removes the gap and 10 applies the maximum spacing.

Examples: gap=0 gap=1 gap=6 gap=10


Margin

  • margin="m-4": Adds a margin of 4 units to all sides.

  • margin="m-0": Removes all margins.

  • margin="mr-6": Adds a margin of 6 units to the right side.

  • margin="mx-3": Adds a margin of 3 units to both the left and right sides.

Note: Not all prefixes are available!

All available prefixes: m- mt- mr- mb- ml- mx- my-


Visible

Controls the visibility of the UI element. When set to True, the element is displayed; when set to False, the element is hidden from the UI.

Examples:

  • visible=True

  • visible=False

The margin option adds extra spacing around or inside a UI element. It accepts ranging from 0 to 10. Examples:

Tab
Tailwind CSS margin classes