MeDo

Generador de Encabezados con IA.

Describe la parte superior de tu página y MeDo construye toda la franja — logo y lockup de marca, una barra de anuncios opcional encima, comportamiento de scroll sticky con blur de vidrio esmerilado, y el CTA. Los enlaces de navegación viven dentro; el encabezado es todo lo que los enmarca.

Encabezado
Encabezado

El encabezado es el único componente que aparece en todas las páginas

Cambie lo que cambie entre tu landing page, tu documentación y tu flujo de pago, el encabezado permanece constante. Eso lo convierte en el elemento que carga la identidad de marca, y también en el lugar más caro donde equivocarse con el rendimiento: un encabezado que se desplaza cuando cargan las fuentes, o que no reserva altura antes de la hidratación, produce layout shift en todas las páginas que ve un visitante, no en una sola. El comportamiento sticky tiene el mismo multiplicador. Un blur que se repinta en cada frame de scroll te cuesta fluidez en todo el sitio. Como se genera una vez y se usa en todas partes, al encabezado vale la pena sobre-especificarlo en el prompt.

6 plantillas

Plantillas de Encabezado que puedes generar

Cada plantilla es un prompt real, no una captura de pantalla. Cópialo en cualquier editor de IA o ejecútalo en MeDo y obtén código React + Tailwind.

Fixed heightAcme

Sticky Header With a Frosted Scroll State

The default worth starting from: a pinned height and a blur that only appears once you have scrolled. Specifying the height is the whole point — a header that sizes to its content shifts on every page as the webfont swaps in.

Create a sticky website header with an explicit 64px height set on the container so the space is reserved before the logo and webfonts load. Logo mark plus wordmark on the left, four navigation links in the middle, one filled Get started button on the right. Start with a solid white background and a 1px bottom border, then switch to a semi-transparent surface with a backdrop blur once the page scrolls past 80px, transitioning over 200ms. Drive the state from an IntersectionObserver watching a 1px sentinel above the header rather than a scroll listener, so nothing runs on the scroll thread. Below 768px, replace the links with a hamburger that opens a drawer.

Prueba en MeDo
Announcement barMega

Promo Bar Above a Sticky Row

Two stacked strips where only the lower one stays pinned. The trap is the sticky offset: dismiss the bar without recomputing it and the header floats 36px below the viewport top for the rest of the session.

Create a two-part header: a dismissible 36px announcement bar on an accent background with a short promo line, an inline link and a close button, and beneath it a 64px main row with logo, links and a CTA. Only the main row is sticky. Persist the dismissal in localStorage so the bar does not return on the next page, and recompute the sticky top offset when it is removed so the main row still pins flush to the viewport top. Render the bar server-side and hide it with a class rather than mounting it after hydration, so dismissing it never causes a visible reflow of the page below.

Prueba en MeDo
TransparentShipfast

Transparent Over Hero, Solid on Scroll

For landing pages with a full-bleed hero behind the header. Everything that depends on the background — logo variant, link color, border, button style — has to flip in one state change, not four.

Create a header that overlays a full-bleed hero image: fully transparent with no border at the top of the page, with a light logo variant and white links. Once the page scrolls past the hero height, switch in a single state change to a solid white surface, a dark logo variant, dark links and a 1px bottom border, transitioning over 200ms. Keep the header height fixed at 72px in both states so the switch does not move the links. Add a scroll-margin-top equal to the header height on all headings so in-page anchors do not land behind the bar.

Prueba en MeDo
Two-rowShop

Utility Row Over a Sticky Search Row

A storefront header where the top row scrolls away and the search row stays. Pinning both eats 100px of a phone viewport, which is most of a product image.

Create a two-row e-commerce header. The top row, 32px tall, carries a free-shipping message on the left and Track order, Help and account links on the right, and scrolls away with the page. The bottom row, 64px tall, holds the logo, a wide search input, a wishlist icon and a cart button with a count badge, and is the only row that stays sticky. Announce cart count changes through an aria-live="polite" region. Below 768px, collapse the top row entirely, keep logo, search icon and cart in the sticky row, and open search as a full-width overlay when the icon is tapped.

Prueba en MeDo
App shellDocs

Fixed Header With a Sidebar Toggle

A docs header that has to coordinate with a sidebar below it. Reserve the toggle button's space at every breakpoint, otherwise the logo jumps sideways when the button appears at the tablet threshold.

Create a fixed 56px documentation header: a sidebar toggle button on the far left that is only interactive below 1024px but keeps its 40px slot reserved at every breakpoint so the logo never shifts, then the logo, a version switcher, a search button with a Command-K hint, a theme toggle and a GitHub link. Because the header is fixed rather than sticky, add matching top padding to the page body and set scroll-margin-top on every heading so deep links from search land below the bar. Give the toggle aria-expanded and aria-controls pointing at the sidebar element.

Prueba en MeDo
StaticStudio

Oversized Wordmark, No Sticky

Not everything needs to be pinned. A tall static header that scrolls away gives an agency site its full viewport back, and removes the scroll listener along with it.

Create a static header for a design studio that scrolls away with the page rather than sticking: 120px tall, with an oversized lowercase wordmark on the left, a one-line location and availability note beneath it, and four right-aligned links in a light weight with wide letter spacing. No border, no background change, no scroll listener at all. Below 640px, reduce the height to 80px, keep the wordmark, and move the four links into a full-screen overlay opened by a text Menu button — labelled Menu rather than a hamburger icon, and closing on Escape with focus returned to the button.

Prueba en MeDo

Cómo personalizar tu Encabezado

Fija la altura antes de estilizar nada

Pide una altura de encabezado explícita. Cuesta una línea y elimina el layout shift que de otro modo ocurre en cada página mientras cargan el logo y las fuentes web, la regresión de Core Web Vitals más común atribuible a un encabezado.

Limita el estado de scroll

Un backdrop blur que se activa con un listener de scroll sin limitar se repinta decenas de veces por segundo. Especifica que el manejador de scroll debe limitarse con requestAnimationFrame, o gobernarse con un centinela de IntersectionObserver, para que el desplazamiento siga siendo fluido en hardware de gama media.

Trata la barra de anuncios como parte del encabezado

Si quieres una franja promocional sobre la fila principal, descríbela en el mismo prompt para que su altura se contabilice en el desplazamiento sticky. Añadida después, o tapa contenido o cuenta doble su altura una vez descartada.

Especifica el lockup de marca con precisión

Di si quieres solo la marca gráfica, la marca más el logotipo tipográfico, o un logotipo que se reduzca solo a la marca en pantallas pequeñas. El encabezado es el único componente en todas las páginas, así que aquí es donde la consistencia de marca se impone o se pierde.

Quién usa el componente Encabezado

Sitio de producto SaaS

Un encabezado blanco de 64px con altura fija, un blur esmerilado al desplazarse y una barra de anuncios descartable encima con una promo de lanzamiento durante toda la campaña.

Tienda de comercio electrónico

Un encabezado de dos filas donde la superior lleva un banner de envío gratis y enlaces de cuenta, y la inferior contiene la búsqueda y el carrito, quedando sticky solo la fila inferior mientras el comprador se desplaza.

Página de marketing o landing

Un encabezado transparente sobre una imagen hero a sangre completa que pasa a un fondo sólido al desplazarse, con el logo cambiando de variante clara a oscura en el mismo breakpoint.

Sitio de documentación para desarrolladores

Un encabezado fijo con selector de versión y disparador de búsqueda, más un toggle de barra lateral que aparece por debajo del breakpoint de tablet y reserva su propio espacio para que el contenido de la documentación nunca se recomponga.

Patrones de Encabezado para distintos sitios web

El mismo componente encabezado, adaptado al tipo de sitio donde se publica.

01 / 06

SaaS Product Header

One fixed-height sticky strip with a brand lockup, links and a single CTA. Because it renders on every route, any layout shift here is multiplied across your whole Core Web Vitals field data rather than isolated to the landing page.

Estilos y variantes de Encabezado

Elige la variante que encaje con el resto de la página y genérala.

01 / 06

Fixed-Height Sticky Header

An explicit height on the container, pinned to the top. The height is not a styling detail — without it the strip resizes as the logo and webfonts resolve, and that shift lands on every page a visitor opens.

Encabezado en React, Next.js, Vue y Svelte

React, Next.js, Vue 3, SvelteKit, Astro o HTML puro: el mismo encabezado, seis formas de integrarlo.

01 / 06

React Header

Keep the scroll state in the header itself with an IntersectionObserver on a sentinel div, not a scroll listener. Render it once above your router outlet so the observer is created once per session.

src/components/Header.tsx

export function Header() {
  const [pinned, setPinned] = useState(false)
  const ref = useRef(null)

  useEffect(() => {
    const io = new IntersectionObserver(
      ([e]) => setPinned(!e.isIntersecting)
    )
    io.observe(ref.current)
    return () => io.disconnect()
  }, [])

  return <header className={pinned ? 'backdrop-blur' : ''} />
}

Cómo añadir tu Encabezado a un proyecto

Cuatro pasos, desde elegir una plantilla de encabezado hasta llevarlo a producción.

01~30s

Pick a Header Template

Decide two things first: does the strip stay pinned, and is there an announcement bar. Those choices drive the sticky offset and the scroll state, and they are the awkward ones to retrofit.

02~10s

Copy the Prompt

Paste it into MeDo, Lovable, Bolt, v0 or Cursor. Keep the explicit pixel height and the sentinel-based scroll state in the text — those two sentences are what stop the header shifting and repainting on every page.

03~1min

Generate and Refine

You get React + Tailwind back with a live preview. Follow up in plain English — "make the blur stronger", "persist the dismissed announcement bar", "flip the logo variant on scroll".

04~2min

Mount It in Your Layout

Put the header above {children} in your root layout. If it is fixed rather than sticky, add matching top padding to the body and scroll-margin-top to your headings so anchor links do not land underneath it.

Preguntas frecuentes sobre Encabezado

¿Qué es un generador de encabezados con IA?

Un generador de encabezados con IA es una herramienta que toma una descripción en lenguaje natural de tu sitio web y produce automáticamente el HTML, CSS y JavaScript para un componente de encabezado completo y estilizado. En lugar de escribir código de maquetación desde cero, describes lo que quieres y obtienes código funcional a cambio.

¿Cómo creo un encabezado de sitio web con IA?

Abre MeDo, escribe un prompt como "Crea un encabezado sticky para una agencia de diseño con logo a la izquierda, enlaces para Trabajo, Acerca y Contacto, y un botón 'Hablemos' a la derecha", y MeDo genera el componente completo. Luego puedes copiar el código o seguir editándolo con prompts de seguimiento.

¿Puedo generar un encabezado responsive con IA?

Sí. MeDo genera encabezados mobile-first por defecto. Dile los breakpoints o dispositivos que te importan — "haz que colapse a un menú hamburguesa por debajo de 768px" — y maneja la lógica responsive por ti.

¿Cuál es la diferencia entre un encabezado (header) y una navbar?

El encabezado es la franja de ancho completo en la parte superior de cada página: lockup de marca, barra de anuncios opcional, comportamiento sticky y de scroll, y el contenedor que sostiene todo. La navbar son los enlaces de navegación que hay dentro. Construye el encabezado cuando te importe cómo se ve y se comporta la parte superior de la página en todo el sitio; consulta el generador de navbar con IA cuando tu pregunta sea realmente sobre estructura de enlaces, menús desplegables y el menú móvil.

¿Cómo evito que mi encabezado provoque layout shift?

Dale al encabezado una altura explícita en el prompt para que el navegador reserve el espacio antes de que carguen las fuentes y el logo, y reserva sitio para cualquier barra de anuncios en lugar de dejar que empuje el contenido hacia abajo después de la hidratación. Si el encabezado es fixed en vez de sticky, añade un padding superior equivalente al cuerpo de la página. Pide a MeDo una altura de encabezado fija y aplicará ambas cosas.

¿Cuál es la mejor herramienta de IA para generar encabezados web?

MeDo está diseñado específicamente para generar componentes web individuales a partir de prompts, incluidos encabezados. A diferencia de las herramientas de chat de IA de propósito general, MeDo entiende la estructura de componentes, los requisitos de accesibilidad y los patrones UX del mundo real — por lo que el resultado es más cercano a lo que enviaría un desarrollador front-end senior.