Movatterモバイル変換


[0]ホーム

URL:


Skip to content
DEV Community
Log in Create account

DEV Community

Kien Nguyen Chi
Kien Nguyen Chi

Posted on

     

Hacktoberfest - Working with v-tooltip

Project Introduction

👉During the Hacktoberfest month, I worked a project using Javascript Framework - Vue. This is the first time I work with this framework so it's worth my try.

👉The project is about an online tool to visualize the color palette. You can take a look at itsGitHub Repo or myFolked Repo.

Project Issue

❓I took an issue on this project: Whenever user hovers over a button on the website, it would display a small hover text in order to show the explanation how the button works. There are 9 buttons I needed to implement in total.

👉After researching for hours how to implement a hover text nicely, I tried several ways and it seemed too long, complicated and duplicated code to implement. Finally, I found out that Vue Framework providing a very useful tool to implement hover text, which is v-tooltip.

🔗This is my filingIssue on GitHub.

Project Process

I installed the v-tooltip package by the Command Prompt.

npm install --save v-tooltip
Enter fullscreen modeExit fullscreen mode

I imported package in main.js file.

import VTooltip from "v-tooltip";//some codeVue.use(VTooltip);
Enter fullscreen modeExit fullscreen mode

I added the attributes of v-tooltip to any tag that I want to show when hovering. Specifically, in this time, I add it to a button. The value of that v-tooltip attribute in Export Button is "Export color to JSON".

<button @click="exportColors" v-tooltip="'Export color to JSON'">Export</button>
Enter fullscreen modeExit fullscreen mode

And here is the result when I hover the Export button. Of course, I implemented all 9 buttons but I just screenshot 1 for example.

🔗This is myPull Request on GitHub.

👉The owner of this repo is really nice. He always replies as soon as possible, shows me to clean the code so he would merge it to main branch. It is nice to work with him.

✔️Overall, it is fantastic to learn a new tool from a new framework. Last project on Hacktoberfest, I worked with Rust, language I have never coded before. I'm looking forward to learn as many new programming languages/frameworks as possible during this Hacktoberfest.

Top comments(0)

Subscribe
pic
Create template

Templates let you quickly answer FAQs or store snippets for re-use.

Dismiss

Are you sure you want to hide this comment? It will become hidden in your post, but will still be visible via the comment'spermalink.

For further actions, you may consider blocking this person and/orreporting abuse

Senior Programming Student at Seneca College
  • Location
    Toronto, ON, Canada
  • Education
    Seneca College
  • Joined

More fromKien Nguyen Chi

DEV Community

We're a place where coders share, stay up-to-date and grow their careers.

Log in Create account

[8]ページ先頭

©2009-2025 Movatter.jp