Skip to content

Latest commit

 

History

History

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 
 
 
 
 

README.md

Frontend Mentor - Interactive card details form

Welcome! 👋

Thanks for checking out this front-end coding challenge.

Frontend Mentor challenges help you improve your coding skills by building realistic projects.

To do this challenge, you need a basic understanding of HTML, CSS and JavaScript.

The challenge

Your challenge is to build out this Interactive card details form and get it looking as close to the design as possible.

You can use any tools you like to help you complete the challenge. So if you've got something you'd like to practice, feel free to give it a go.

Your users should be able to:

  • Fill in the form and see the card details update in real-time
  • Receive error messages when the form is submitted if:
    • Any input field is empty
    • The card number, expiry date, or CVC fields are in the wrong format
  • View the optimal layout depending on their device's screen size
  • See hover, active, and focus states for interactive elements on the page

Expected behaviour

  • Update the details on the card as the user fills in the fields
  • Validate the form fields when the form is submitted
  • If there are no errors, display the completed state
  • Reset the form when the user clicks "Continue" on the completed state

⚠️ IMPORTANT ⚠️: When you create the live version of your project, we recommmend giving it a random name for the URL. This is because with it being a fake credit card form, some browsers will open a warning notice before people can access your project. So it's best to name the project something unrelated to credit cards so that browsers don't show the warning to people viewing your project.

Table of contents

Design preview for the Interactive card details form coding challenge

Expected Result

Mobile Layout (375px)

mobile-design

complete-state-mobile

Desktop Layout (1440px)

desktop-design

active-states

complete-state-desktop

My Result

Mobile Layout (375px)

mobile-design

mobile-completed-state-design

Desktop Layout (1440px)

desktop-design

desktop-error-design

desktop-completed-state-design

Links

My process

Built with

  • Semantic HTML5 markup
  • CSS custom properties
  • Flexbox
  • Mobile-first workflow
  • Pure JavaScript

Author