Giter Site home page Giter Site logo

onerbs / daniela Goto Github PK

View Code? Open in Web Editor NEW
1.0 1.0 1.0 34 KB

Collection of customizable DOM dialogs

Home Page: https://onerbs.github.io/daniela

License: MIT License

TypeScript 39.16% SCSS 24.36% JavaScript 18.02% Shell 6.97% Batchfile 11.50%
toast input dialog prompt

daniela's Introduction

Daniela

Collection of customizable DOM dialogs.

For usage, see the example code.

Installation

npm i daniela

or

<link rel="stylesheet" href="https://unpkg.com/daniela/dist/daniela.min.css">
<script src="https://unpkg.com/daniela/dist/daniela.min.js"></script>

Customization

You can override the following CSS variables:

--daniela-background (default: #000)

--daniela-foreground (default: #EEE)

--daniela-z-dialog (the dialog z-index, default: 20)

--daniela-z-toast (the toast z-index, default: 30)

--daniela-radii (for the border-radius, default: 4pt)

API

toast void

Display a message by the given time.

message string

The message to be shown.

time ?number

The time on screen (ms)
The default value is 3000


decide Promise<boolean>

Ask the user a question.

question string

The question to be asked (question mark not included).
The only possible answers are Yes or No.


input Promise<string>

Read input from the user.

headline string

The title of the dialog.

hint ?string

The input label.
The default value is empty.

validate ?(value: string) => boolean

The validation function take as parameter the input value and check if is valid or not.
By default, it checks that the value is not empty.

daniela's People

Contributors

onerbs avatar

Watchers

 avatar

Forkers

ebamienlen

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.