Ir al contenido
Español
Tarjeta de meteoros viene con Pro. La vista previa aparece al desbloquearlo.

Cómo funciona

The card is always dark, because the light needs a night sky: a gradient ink background, a tinted glow in the top corner and a still starfield that fades out towards the bottom. Each meteor is a zero-size anchor turned to 140°; its streak, a pseudo-element with a fading tinted tail and a bright head, travels along that axis during the first 42% of its cycle and rests for the remainder. Positions, lengths, brightness and timing come from a fixed seed, so the server and the browser draw the same sky and only a few streaks cross at once. Everything is CSS, so the motion pauses with the page.

Úsalo para

  • A single highlighted feature on a landing or pricing page.
  • Announcements and launch cards that need atmosphere without imagery.

Busca otra opción cuando

  • Grids of many cards: the motion competes with itself.
  • Dense content people must read at length.

Uso

import { MeteorCard } from './MeteorCard.jsx'

export function SyncFeature() {
  return (
    <MeteorCard
      eyebrow="Realtime"
      title="Edit together, from anywhere"
      description="Cursors, comments and history stay in step across every device."
      icon={<SyncIcon />}
      count={14}
      tint="indigo"
    >
      <a href="/guide">Read the guide</a>
    </MeteorCard>
  )
}

Propiedades

PropiedadTipoPor defectoQué hace
eyebrowReactNode—Small uppercase line at the top.
titleReactNode—Heading (h3).
descriptionReactNode—Body text.
iconReactNode—Icon in a glassy tile beside the eyebrow.
childrenReactNode—Anything after the text, such as figures or a link.
countnumber14Number of meteors (0 to 40).
speednumber1Pace multiplier; 0.5 is half as fast.
tint'indigo' | 'teal' | 'rose''indigo'Colour of the glow and the tails.
starsbooleantrueShows the still starfield.
asElementType'article'Root element.

Accesibilidad

  • The sky is decorative and aria-hidden; the content is ordinary markup with the title as an <h3> inside an <article>.
  • Light text on the near-black background stays above 7:1 for the title and 4.5:1 for the body.
  • Streaks pass behind the content and fade near it, so they never cross text at full brightness for long.
  • Reduced motion removes the meteors entirely; the stars and glow remain.

Movimiento

Each meteor cycles every 5–11 s (divided by speed); it fades in over 6% of the cycle, crosses about 520px with a gentle ease, fades out by 42% and rests. Hover lifts the content by 1px over 360ms.

Añádelo a tu proyecto

Los miembros Pro copian un prompt y su agente de programación instala el código, igual que con los gratuitos.

MeteorCard.jsxmeteor-card.csstokens.cssREADME.md

Los dos archivos se instalan juntos. La hoja de estilos lee las variables de tokens.css y lleva valores de reserva, así que también funciona sola.

Tarjetas
Tarjeta con borde animado viene con Pro. La vista previa aparece al desbloquearlo.
Borde con haz de luz viene con Pro. La vista previa aparece al desbloquearlo.
Tarjeta con hoja de datos viene con Pro. La vista previa aparece al desbloquearlo.