Nucleus Powered Mitochondria

    perfect-gui

    4.1.3 • Public • Published

    Perfect GUI

    A nice, simple and (probably not) perfect GUI for JavaScript.

    Features:

    • image buttons
    • multiple panels
    • easy positioning
    • draggable panels
    • two-dimensional vector visualization

    API

    Documentation

    Install

    npm i perfect-gui

    Hello world

    import GUI from 'perfect-gui';
    
    const gui = new GUI();
    
    gui.button('Click me', callback);

    Options

    const gui = new GUI({
        name: 'My GUI',
        // Name of the panel. 
        // Default is null.
    
        container: '#container',
        // Element containing the GUI
        // Default is document.body
        
        width: 250,
        // Width of the panel (in pixels). 
        // Default is 290.
    
        maxHeight: 500,
        // Maximum height beyond which scrolling is necessary. 
        // Default is the smallest value between the height of the window and the height of the container.
        
        closed: false, 
        // Defines whether the panel should be closed by default. 
        // Default is false.
    
        position: 'bottom right',
        // Defines where to place the panel on screen.
        // Accepted values are 'top', 'bottom', 'left' and 'right' in no particular order ('bottom right' = 'right bottom').
        // If multiple instances have the same position, they will be stacked horizontally.
        // Default is 'top right'.
    
        draggable: false,
        // Defines if the panel can be manually moved across the screen.
        // Default is false.
    
        autoRepositioning: true,
        // If set to true, the panel position will be reset when the screen is resized.
        // If a panel has been dragged, it won't be be affected.
        // Default is true.
    
        color: '#bada55',
        // Default is #2e2e2e
    });

    Methods

    Keywords

    Install

    npm i perfect-gui

    DownloadsWeekly Downloads

    445

    Version

    4.1.3

    License

    MIT

    Unpacked Size

    36.6 kB

    Total Files

    5

    Last publish

    Collaborators

    • thibka