Skip to content

haquanq-frontendmentor/newsletter-sign-up-form

Repository files navigation

Frontend Mentor - Newsletter Sign-up Form With Success Message Solution

This is a solution to the Newsletter sign-up form with success message challenge on Frontend Mentor. Frontend Mentor challenges help you improve your coding skills by building realistic projects.

Solution post Live demo

Table of Contents

🌅 Project Overview

Challenge Requirements

  • Add their email and submit the form
  • See a success message with their email after successfully submitting the form
  • See form validation messages if:
    • The field is left empty
    • The email address is not formatted correctly
  • View the optimal layout for the interface depending on their device's screen size
  • See hover and focus states for all interactive elements on the page

Status

Features

  • Accessible form controls with validataions

Accessibility

  • Responsive accross different screen sizes
  • Interactive elements have clear focus indicator

Preview (Desktop)

🌠 Tech Stack and Approach

Built With

  • HTML5 – Semantic structure
  • CSS Grid & Flexbox – Layout
  • PostCSS – Nested rules, custom media queries, future CSS features, minification
  • Stylelint – CSS linting, code style consistency
  • TypeScript - Interactivity and application logic
  • Vite - Fast development server, production build and easy configuration

Approach

🍃 Local Development

Prerequisites

Install the following:

  • Git (latest version)
  • Node.js (latest LTS recommended)
  • pnpm (latest version)

Setup

git clone https://github.com/haquanq-frontendmentor/newsletter-sign-up-form.git
cd newsletter-sign-up-form
pnpm install

Start Development Server

pnpm dev

🍁 Deployment

Deployed to Github Pages via Github Actions (manually triggered).