Web InnoventixFreeCode

Side Image Idea Hero

MIT · attributed

Landing hero with a responsive nav (React mobile toggle), gradient-accent heading, dual CTAs, and a full-height gradient side panel. Dark-mode ready.

byKhatab Wedaa (Meraki UI)React + Tailwind
herosplit heronavbarlanding heroside panelresponsive
Open

Copy prompt gives Claude Code, Cursor or v0 a ready-to-paste prompt that recreates this exact component.

npx shadcn@latest add https://webinnoventix.com/r/src-sideimage-idea-hero.json
src-sideimage-idea-hero.tsx
/* Source: Khatab Wedaa (Meraki UI) — https://github.com/merakiui/merakiui/blob/main/components/heros/SideImage.html — MIT. Included under its original licence. */
/* Copyright (c) 2021 Khatab Wedaa. MIT License. Alpine.js converted to React state; hotlinked logo/photo replaced with self-contained markup. */

"use client";

import { useState } from "react";

export default function SrcSideImageIdeaHero() {
  const [isOpen, setIsOpen] = useState(false);

  return (
    <header className="bg-white dark:bg-gray-900">
      <nav className="px-6 py-4 shadow">
        <div className="lg:flex lg:items-center lg:justify-between">
          <div className="flex items-center justify-between">
            <a href="#" className="text-lg font-bold text-gray-800 dark:text-white">
              FreeCode
            </a>

            <div className="lg:hidden">
              <button
                onClick={() => setIsOpen((v) => !v)}
                type="button"
                aria-label="toggle menu"
                className="text-gray-500 hover:text-gray-600 focus:text-gray-600 focus:outline-none dark:text-gray-200 dark:hover:text-gray-400 dark:focus:text-gray-400"
              >
                {!isOpen ? (
                  <svg
                    xmlns="http://www.w3.org/2000/svg"
                    className="h-6 w-6"
                    fill="none"
                    viewBox="0 0 24 24"
                    stroke="currentColor"
                    strokeWidth="2"
                  >
                    <path strokeLinecap="round" strokeLinejoin="round" d="M4 8h16M4 16h16" />
                  </svg>
                ) : (
                  <svg
                    xmlns="http://www.w3.org/2000/svg"
                    className="h-6 w-6"
                    fill="none"
                    viewBox="0 0 24 24"
                    stroke="currentColor"
                    strokeWidth="2"
                  >
                    <path strokeLinecap="round" strokeLinejoin="round" d="M6 18L18 6M6 6l12 12" />
                  </svg>
                )}
              </button>
            </div>
          </div>

          <div
            className={`${
              isOpen ? "translate-x-0 opacity-100" : "-translate-x-full opacity-0"
            } absolute inset-x-0 z-20 w-full bg-white px-6 py-4 shadow-md transition-all duration-300 ease-in-out lg:relative lg:top-0 lg:mt-0 lg:flex lg:w-auto lg:translate-x-0 lg:items-center lg:bg-transparent lg:p-0 lg:opacity-100 lg:shadow-none dark:bg-gray-900 lg:dark:bg-transparent`}
          >
            <a href="#" className="block rounded-lg px-3 py-2 text-gray-600 hover:bg-gray-100 lg:mx-2 dark:text-gray-200">
              Home
            </a>
            <a href="#" className="block rounded-lg px-3 py-2 text-gray-600 hover:bg-gray-100 lg:mx-2 dark:text-gray-200">
              About
            </a>
            <a href="#" className="block rounded-lg px-3 py-2 text-gray-600 hover:bg-gray-100 lg:mx-2 dark:text-gray-200">
              Contact
            </a>
          </div>
        </div>
      </nav>

      <div className="lg:flex">
        <div className="flex w-full items-center justify-center px-6 py-8 lg:h-[32rem] lg:w-1/2">
          <div className="max-w-xl">
            <h2 className="text-3xl font-semibold text-gray-800 lg:text-4xl dark:text-white">
              Build Your New <span className="text-blue-600 dark:text-blue-400">Idea</span>
            </h2>

            <p className="mt-4 text-sm text-gray-500 lg:text-base dark:text-gray-400">
              Lorem ipsum dolor sit amet, consectetur adipisicing elit. Blanditiis commodi cum
              cupiditate ducimus, fugit harum id necessitatibus odio quam quasi, quibusdam rem
              tempora voluptates.
            </p>

            <div className="mt-6 flex flex-col space-y-3 lg:flex-row lg:space-y-0">
              <a
                href="#"
                className="block transform rounded-md bg-gray-900 px-5 py-2 text-center text-sm font-medium tracking-wider text-white transition-colors duration-300 hover:bg-gray-700"
              >
                Get Started
              </a>
              <a
                href="#"
                className="block transform rounded-md bg-gray-200 px-5 py-2 text-center text-sm font-medium tracking-wider text-gray-700 transition-colors duration-300 hover:bg-gray-300 lg:mx-4"
              >
                Learn More
              </a>
            </div>
          </div>
        </div>

        <div className="h-64 w-full lg:h-auto lg:w-1/2">
          <div
            aria-hidden="true"
            className="h-full w-full bg-gradient-to-br from-blue-500 via-indigo-500 to-slate-900"
          >
            <div className="h-full w-full bg-black opacity-25" />
          </div>
        </div>
      </div>
    </header>
  );
}

Dependencies

None — React + Tailwind only.

Licence

Khatab Wedaa (Meraki UI) (original) · Licensed under MIT.

Built by Web Innoventix

Need a custom interface, a full website, or SEO that gets you cited by AI? We design, build and rank it end to end.

Get a free quote

Similar components

Browse all →
Spotlight Hero

Spotlight Hero

Original

A centred hero with a soft radial spotlight, badge and dual call-to-action.

Split Hero

Split Hero

Original

A two-column hero pairing a headline and CTAs with a product mock and social proof.

Gradient Spotlight Hero

Gradient Spotlight Hero

Original

A minimal centred hero with a soft gradient-mesh backdrop, announcement pill and dual call-to-action buttons.

App Preview Hero

App Preview Hero

Original

A centred hero that pairs headline copy with a realistic product dashboard mock built entirely from markup, complete with browser chrome and a floating notification card.

Waitlist Capture Hero

Waitlist Capture Hero

Original

A dark, focused hero with an inline email capture form and avatar social proof, ready for pre-launch waitlists.

Image Backdrop Hero

Image Backdrop Hero

Original

A cinematic full-bleed hero with a layered image-style backdrop, overlaid left-aligned copy and a trusted-by logos strip.

Gradient Mesh Hero with Staggered Text Reveal

Gradient Mesh Hero with Staggered Text Reveal

Original

A full-screen hero pairing a drifting animated gradient-mesh backdrop with a word-by-word staggered blur-in headline and a logo marquee under the fold.

Typewriter Rotating Words Hero

Typewriter Rotating Words Hero

Original

A hero whose headline cycles through rotating words with a live typewriter caret over an animated grid backdrop, degrading to a gentle word swap when reduced motion is on.

Floating UI Cards Hero with Mouse Parallax

Floating UI Cards Hero with Mouse Parallax

Original

A hero with glassy floating UI cards that drift continuously and shift on mouse-parallax depth around a staggered centre headline.

Aurora Hero with Shimmer CTA and Logo Marquee

Aurora Hero with Shimmer CTA and Logo Marquee

Original

A dark hero with animated aurora light beams, a shimmering sweep across the primary CTA, and dual-direction logo marquees beneath the fold.

Gradient Conversion Hero

Gradient Conversion Hero

MIT

Centered, full-screen marketing hero with a colour-accent headline word, supporting copy, and dual primary/secondary CTA buttons. Dark-mode ready and dependency-free.

Split Showcase Hero

Split Showcase Hero

MIT

Two-column hero on a dark background — headline, paragraph, and two buttons beside a gradient media panel. Responsive column stack on mobile.