Coder Social home page Coder Social logo

frontendmentor-pricing-component's Introduction

Frontend Mentor - Pricing component with toggle solution

This is a solution to the Pricing component with toggle challenge on Frontend Mentor. Frontend Mentor challenges help you improve your coding skills by building realistic projects.

Table of contents

Overview

I wanted to take a shot at using raw web components and this was my first attempt. Conclusion: I dont like them - yet.

Styling web components is trick and a pain. There isnt a clear or easily manageable way to have separate style, markup, and js files that combine together. React is essentially a way to make web components easier to manage but for some dumb reason leaves out the custom tag names (ie the whole damn point of custom components). Angular is a more fully featured wrapper for these components but comes with a ton of overhead.

I think I'll give web components another shot at a later time but for now I'm throwing in the towel.

Oh, and the particular design is a pain in the ass IMO. The colors in the style-guide do not clearly represent their elements and its just in general a difficult to look at design.

The challenge

Users should be able to:

  • View the optimal layout for the component depending on their device's screen size
  • Control the toggle with both their mouse/trackpad and their keyboard

Screenshot

As far as I got on the desktop before I threw in the towel. Desktop

Links

My process

I started with just experimenting with web components and trying to come up with a manageable way to work with them. I hate mixing concerns by having styles, markup, and JS in a single file. I didnt really come up with a good way to manage it all.

Built with

  • Semantic HTML5 markup
  • CSS custom properties
  • Flexbox
  • Web Components

What I learned

Web components have a good ways to go before I'm convinced to use them professionally. There needs to be a clear and built in way to load external html and css files to render.

frontendmentor-pricing-component's People

Contributors

jdillon522 avatar

Watchers

 avatar  avatar

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.