Creating a Call to Action Button

I wrote a button web component. It’s not perfect, but it’s mine. As you know, I’ve been working on web components for a while now. Last week I started writing a new one. My goal for this project has been to get more comfortable with JavaScript and my a…


This content originally appeared on DEV Community and was authored by Kern Designs

I wrote a button web component. It's not perfect, but it's mine. As you know, I've been working on web components for a while now. Last week I started writing a new one. My goal for this project has been to get more comfortable with JavaScript and my abilities.

Issues

One of the things I am continuously learning is Windows OS is awful. I'm a long time user and would normally say I love it but over the past few weeks it has been horrible. Yarn and Windows must be mortal enemies that decided to come together to make my life hell. They won. Yarn has been so difficult to use. I finally figured it out but I would not recommend mixing Windows and Yarn in the future.

Successes

Good thing that happened - utilizing other elements and libraries actually was much easier than I remember! With like five lines of code there is now an icon in my button. That was so easy. I will definitely be doing that in the future. I also used different states of the button. This was also much easier than I thought it would be. The button can change when its active, disabled, hovered, and focused. Most of this was done through CSS although I did have to use JS for the disabled property. Overall, this button was a success!

Here it is!
Alt Text

This has been a great experience for me to learn. I successfully feel much more confident and I have a working button! Keep your eyes peeled for it to be on npm, but for now check out my GitHub repo.

https://github.com/hvk5388/cta-button/tree/main/hktb


This content originally appeared on DEV Community and was authored by Kern Designs


Print Share Comment Cite Upload Translate Updates
APA

Kern Designs | Sciencx (2021-09-23T18:44:18+00:00) Creating a Call to Action Button. Retrieved from https://www.scien.cx/2021/09/23/creating-a-call-to-action-button/

MLA
" » Creating a Call to Action Button." Kern Designs | Sciencx - Thursday September 23, 2021, https://www.scien.cx/2021/09/23/creating-a-call-to-action-button/
HARVARD
Kern Designs | Sciencx Thursday September 23, 2021 » Creating a Call to Action Button., viewed ,<https://www.scien.cx/2021/09/23/creating-a-call-to-action-button/>
VANCOUVER
Kern Designs | Sciencx - » Creating a Call to Action Button. [Internet]. [Accessed ]. Available from: https://www.scien.cx/2021/09/23/creating-a-call-to-action-button/
CHICAGO
" » Creating a Call to Action Button." Kern Designs | Sciencx - Accessed . https://www.scien.cx/2021/09/23/creating-a-call-to-action-button/
IEEE
" » Creating a Call to Action Button." Kern Designs | Sciencx [Online]. Available: https://www.scien.cx/2021/09/23/creating-a-call-to-action-button/. [Accessed: ]
rf:citation
» Creating a Call to Action Button | Kern Designs | Sciencx | https://www.scien.cx/2021/09/23/creating-a-call-to-action-button/ |

Please log in to upload a file.




There are no updates yet.
Click the Upload button above to add an update.

You must be logged in to translate posts. Please log in or register.