Git Product home page Git Product logo

keep-input's Introduction

menu

This is a modified version of vC-input by vCodeScripts

Changes

  • Some functions have been rewritten to be compatible with qb input
  • I still need to add somemissing inputs like(checkbox and radiobox)
  • Removed notification function and added it to NUI itself
  • It will highlights required items with *
   local inputData, reason = exports['keep-input']:ShowInput({
     -- background_color = 'red',
     -- submitText = 'SEND', -- will be show as if not used 'ACCEPT'
        inputs = {
            {
                type = 'number',
                isRequired = true, -- or required both are valid
                name = 'cost_of_rental',
                text = 'price for renting this booth?', -- some elements has this value as their placeholder
                icon = 'fa-solid fa-money-bill-trend-up',
                title = 'Rental Cost' -- If there is no title, the name is used as the title
            },
                {
                type = 'password',
                isRequired = true,
                name = 'password',
                text = 'ENTER PASSWORD',
                icon = 'fa-solid fa-money-bill-trend-up',
                title = 'Password'
            },
            {
                text = "Some Select", -- text you want to be displayed as a input header
                name = "someselect", -- name of the input should be unique otherwise it might override
                type = "select", -- type of the input - Select is useful for 3+ amount of "or" options e.g; someselect = none OR other OR other2 OR other3...etc
                options = { -- Select drop down options, the first option will by default be selected
                    { value = "none", text = "None" }, -- Options MUST include a value and a text option
                    { value = "other", text = "Other" }, -- Options MUST include a value and a text option
                    { value = "other2", text = "Other2" }, -- Options MUST include a value and a text option
                    { value = "other3", text = "Other3" }, -- Options MUST include a value and a text option
                    { value = "other4", text = "Other4" }, -- Options MUST include a value and a text option
                    { value = "other5", text = "Other5" }, -- Options MUST include a value and a text option
                    { value = "other6", text = "Other6" }, -- Options MUST include a value and a text option
                },
                -- default = 'other3', -- Default select option, must match a value from above, this is optional
            }
        }
    })
    print(inputData.someselect ,inputData.cost_of_rental, reason)

keep-input's People

Contributors

swkeep avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.