2021.0.0 • Published 3 years ago

robomx-webdialog v2021.0.0

Weekly downloads
-
License
MIT
Repository
github
Last release
3 years ago

Web Floating Dialog

HitCount Node.js Package

A dialog plugin to alert your website users about any important information.

Motivation

Inspired from paper dialog seen on YouTube during COVID-19 outbreak.

How to integrate?

Using NPM

  • Install package.

    npm i robomx-webdialog or yarn add robomx-webdialog

  • Add import.

    import 'robomx-webdialog/dist/webdialog.min';

Using JS script

  • Add following line to bottom of your body tag.

    <script type="text/javascript" src="https://unpkg.com/robomx-webdialog@latest/dist/webdialog.min.js"></script>

Last add the tag:

robomx-webdialog tag before script file. Example:

    <robomx-webdialog
        title="Dialog title"
        description="Dialog description"
        imgSrc="sample.png"
        imgWidth="300px"
        imgHeight="200px"
        position="bottom-left"
        link="example.com"
        actionText="Learn More"
        actionTarget="_blank"
        dismissText="Later"
    ></robomx-webdialog>

Output

Variables

AttributeDefaultAcceptsNote
titleDialog titlestring contentSpecify title of the dialog
descriptionDialog descriptionstring contentGive brief information about the dialog.
actionTextLearn Morestring content`Action button text
imgSrcnullImage pathSpecify image source url or relative path.
imgWidth300pxpx, em, %Specify width of the image.
imgHeight200pxpx, em, %Specify height of the image.
positionbottom-lefttop-left, top-right, bottom-left, bottom-right, centerSpecify position of the dialog box.
darkModefalsebooleanDark mode setup.
bgColor#fffHex Code, RGBBackgroung color of dialog box.
txtColor#373737Hex Code, RGBText color of dialog content.
btnColor#6c6b6bHex Code, RGBButton color of 'Later'.
linkhttp://example.comURLURL for action button.
actionTarget_blank_blank, _self, _parent, _topTarget tab of action button.
dismissTextLaterstring wordDismiss button text.