npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

vuetify-confirm-box

v1.0.10

Published

This plugin make the vuetify custom confirm prompts easier and fluent

Downloads

34

Readme

Vuetify Confirm Box

Installation

Install the package through npm

npm install vuetify-confirm-box

After the package installation is done inside plugins/vuetify.js add the following code.

Vue.use(VuetifyConfirmBox, { vuetify }); // Where vuetify is an instance of imported Vuetify vuetify.js file

Note: Do NOT forget to add the vuetify-confirm-box inside vue.config.js under transpileDependencies.

Usage

Now from every vue component in your app, you can open the confirmation box with the following codes.

this.$confirm.info("a message", "a title {optional}"); //shows an info box
this.$confirm.warning("a message", "a title {optional}"); //shows a warning box
this.$confirm.success("a message", "a title {optional}"); //shows a success box
this.$confirm.error("a message", "a title {optional}"); //shows an error box

To check whether the user confirmed or rejected you will do as follow:

this.$confirm
    .warning("Some message")
    .then(() => { alert("Confirmed") })
    .catch(() => { alert("Rejected") }); // This also may throw if something inside your "then" implementation goes wrong.

Hint: To all the above methods, there is a third parameter that you can pass which will give you the ability to do more customizations. options are described in below section.

Options

  • actionsNegativeToPositive: You can set this option in two places either on each invoke or when configuring the vuetify plugin and adding this component to vuetify. This option will let you to have the negative action button on the left side of the positive action button if any texts exist.
  • allowHtml: This options lets you to render html inside your message content. Take care about harmful content though ;)
  • buttonFalseColor: Set the color for the negative action button. default: secondary
  • buttonTrueColor: Set the color for the positive action button. default: primary
  • buttonFalseFlat: Give the negative action button a flat style. default: true
  • buttonTrueFlat: Give the positive action button a flat style. default: false
  • buttonFalseText: Set the text for the negative action button.
  • buttonTrueText: Set the text for the positive action button.
  • cancelWithEscape: If true the user can exit with pressing ESC. default: true
  • color: Will set the background-color of the whole box.
  • confirmWithEnter: If true the user can confirm the box by pressing Enter. default: false
  • persistent: This will prevent the user to exit the confirmation box by clicking outside of the box. default: false
  • showIcon: This will toggle the toolbar icon visibility default: true
  • showToolbar: This will toggle the toolbar it self default: true
  • smartActions: Setting smartActions is possible globaly and per component call like actionsNegativeToPositive option. This option will order the action buttons based on the first alphabet. so for example it will render ['Cancel', 'Ok'] like Cancel and Ok but ['Yes', 'No'] like No then Yes.
  • theme: Set the confirmation box theme to dark or light. default: light
  • width: Set then maximum width for the box. default: 450