Skip to content

Tradesperson hero with quick quote request in React

Headline, service area, Google rating and job-site photo, with a direct call button and a short callback form (name, phone, need).

Here is an excerpt of this component's code in React. The full code is free for members, ready to copy into your project.

This component also comes in

Open in a new tab

The code in React

ArtisanQuoteHero.tsx
import { useRef, useState, type FormEvent } from "react";

export type CallbackRequest = { nom: string; telephone: string; besoin: string };
type Field = keyof CallbackRequest;

const checks: Record<Field, (value: string) => string> = {
  nom: (value) => (value.trim() ? "" : "Indiquez votre nom pour que nous sachions qui rappeler."),
  telephone: (value) => {
    if (!value.trim()) return "Indiquez votre numéro de téléphone.";
    return /^(\+33|0033|0)[1-9]\d{8}$/.test(value.replace(/[\s.\-]/g, ""))
      ? ""
      : "Ce numéro semble incomplet : saisissez 10 chiffres, par exemple 06 12 34 56 78.";

Free component: copy it freely, including for commercial projects.

Hero sections components in React
  • A dark hero where very large words, outlined or at low opacity, pass behind a two-column text. The animation is CSS only, with no script and no image.

    • Tailwind
    • React
    • CSS
    • WordPress
    Component
  • A festival or fair header: dates, venue, featured artists, a real countdown to opening and ticket options.

    • Tailwind
    • React
    • CSS
    • WordPress
    Component
  • A bright, warm hero: highlighted promise, two buttons, an avatar stack with a rating out of 5, and on the right a customer quote surrounded by result chips.

    • Tailwind
    • React
    • CSS
    • WordPress
    Component
  • Headline, promise and two actions on the left, vector illustration on the right.

    • Tailwind
    • React
    • CSS
    • WordPress
    Component
  • A large serif composition, sober and composed, for liberal professions.

    • Tailwind
    • React
    • CSS
    • WordPress
    Component
  • A powerful headline followed by a row of three reassuring figures.

    • Tailwind
    • React
    • CSS
    • WordPress
    Component