This is a solution to the Interactive card details form challenge on Frontend Mentor. Frontend Mentor challenges help you improve your coding skills by building realistic projects.
Table of contents
Overview
The challenge
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
Screenshot
Links
My process
Built with
- Semantic HTML5 markup
- CSS custom properties
- Flexbox
- CSS Grid
- Mobile-first workflow
- Project IDX - An experimental, web-based, integrated development environment
- Svelte - JS library
- SvelteKit - Svelte framework
- Sass - CSS with superpowers
- Typescript - TypeScript is JavaScript with syntax for types
- Felte - An extensible form library for Svelte, Solid and React
- Zod - TypeScript-first schema validation with static type inference
- Svelte-Motion - An animation library for Svelte-Apps based on Framer Motion
- validator.js - A library of string validators and sanitizers
What I learned
Two main points in this project: Project IDX and Svelte.
Since I like new stuff, I'd like to try Project IDX from Google. It's VSCode online basically. You can install extensions on your IDE and install packages on your project.
And Svelte because it's an alternative to React and Vue for me. It has some different ideas but sometimes remembers React and sometimes Vue.
Author