This is a solution to the Intro component with sign up form challenge on Frontend Mentor. Frontend Mentor challenges help you improve your coding skills by building realistic projects.
Users should be able to:
- View the optimal layout for the site depending on their device's screen size
- See hover states for all interactive elements on the page
- Receive an error message when the
form
is submitted if:- Any
input
field is empty. The message for this error should say "[Field Name] cannot be empty" - The email address is not formatted correctly (i.e. a correct email address should have this structure:
name@host.tld
). The message for this error should say "Looks like this is not an email"
- Any
- Solution URL: https://www.frontendmentor.io/solutions/responsive-signup-form-using-react-and-typescript-ZLixxNjkX
- Live Site URL: https://andrewhuntington.github.io/intro-component-with-sign-up-form
- TypeScript
- CSS custom properties
- Flexbox
- Mobile-first workflow
- React - JS library
- React Hook Form - Form library
The major take away from this project is a fundamental understanding of how to use React Hook Form and how to include type validation in HTML forms using TypeScript.
Another thing that I learned was how to incorporate .svg art into my project, as well as insert these assets into input fields using CSS pseudo selectors, like ::after and ::before.
I hope to continue to further develope my skills with React and TypeScript, as well as learn more CSS tricks and techniques.
- React Hook Form - Documentation for how to use the React Hook Form library.
- The Frontend Mentor Slack Channel - A place to chat with other Frontend Mentor members.
- Website - My Homepage
- Frontend Mentor - @AndrewHuntington
Special thanks to ApplePieGiraffe and Alex Marshall from the Frontend Mentor Slack channel. ApplePieGiraffe's code and advice helped me add icons inside the inputs of my form, and Alex Marshall provided an alternate solution that I may use in the future.