npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@r0rri/react-galaxy-bg

v2.1.0

Published

Un componente React que simula un fondo de galaxia con estrellas animadas y estrellas fugaces

Downloads

117

Readme

React Galaxy Background

Un componente React hermoso y animado que simula un fondo de galaxia con estrellas parpadeantes y estrellas fugaces.

✨ Características

  • Fondo de galaxia con gradiente espacial
  • Tres capas de estrellas con diferentes tamaños y velocidades de animación
  • Estrellas fugaces animadas
  • Completamente personalizable con props
  • TypeScript incluido
  • Optimizado para rendimiento
  • Sin dependencias externas

📦 Instalación

npm install @r0rri/react-galaxy-bg
yarn add @r0rri/react-galaxy-bg

```bash
pnpm add @r0rri/react-galaxy-bg

🚀 Uso básico

import React from 'react';
import { GalaxyComponent } from '@r0rri/react-galaxy-bg';

function App() {
  return (
    <div>
      <GalaxyComponent />
      <div style={{ position: 'relative', zIndex: 1 }}>
        <h1>Tu contenido aquí</h1>
        <p>El fondo de galaxia estará detrás de este contenido</p>
      </div>
    </div>
  );
}

export default App;

⚙️ Props

| Prop | Tipo | Default | Descripción | |------|------|---------|-------------| | starCount1 | number | 700 | Número de estrellas pequeñas (1px) | | starCount2 | number | 200 | Número de estrellas medianas (2px) | | starCount3 | number | 100 | Número de estrellas grandes (3px) | | enableShootingStars | boolean | true | Habilita/deshabilita las estrellas fugaces | | className | string | '' | Clase CSS adicional | | style | React.CSSProperties | {} | Estilos inline adicionales |

🎨 Ejemplos de uso

Configuración personalizada

import { GalaxyComponent } from '@r0rri/react-galaxy-bg';

function CustomGalaxy() {
  return (
    <GalaxyComponent
      starCount1={1000}
      starCount2={300}
      starCount3={150}
      enableShootingStars={true}
      className="mi-galaxia-personalizada"
      style={{ zIndex: -10 }}
    />
  );
}

Sin estrellas fugaces

import { GalaxyComponent } from '@r0rri/react-galaxy-bg';

function StaticGalaxy() {
  return (
    <GalaxyComponent
      enableShootingStars={false}
      starCount1={500}
    />
  );
}

Galaxy minimalista

import { GalaxyComponent } from '@r0rri/react-galaxy-bg';

function MinimalGalaxy() {
  return (
    <GalaxyComponent
      starCount1={200}
      starCount2={50}
      starCount3={25}
      enableShootingStars={false}
    />
  );
}

🎭 Animaciones

El componente incluye varias animaciones:

  • Estrellas flotantes: Las estrellas se mueven verticalmente creando un efecto de profundidad
  • Estrellas fugaces: Aparecen cada 10 segundos con trayectorias diagonales realistas
  • Responsive: Se adapta automáticamente a cambios de tamaño de ventana

🎨 Personalización de estilos

El componente usa CSS personalizado que se inyecta automáticamente. Si necesitas sobrescribir estilos:

/* Personalizar el fondo */
.galaxy-star-background {
  background: radial-gradient(ellipse at center, #2c3e50 0%, #000000 100%) !important;
}

/* Personalizar estrellas fugaces */
.galaxy-shooting-star {
  background-color: #ffeb3b !important;
  filter: drop-shadow(0 0 15px #ffeb3b) !important;
}

📱 Consideraciones de rendimiento

  • Las estrellas se generan usando box-shadow para mejor rendimiento
  • Las animaciones usan transform para aprovechar la aceleración por hardware
  • El componente se actualiza solo cuando cambia el tamaño de la ventana
  • Cleanup automático de intervals y event listeners

🌟 Casos de uso

  • Fondos de páginas web espaciales
  • Landing pages
  • Aplicaciones de astronomía
  • Juegos web
  • Presentaciones
  • Portafolios creativos

🔧 Desarrollo

# Clonar el repositorio
git clone https://github.com/barbarred/react-galaxy-bg.git

# Instalar dependencias
npm install

# Construir el paquete
npm run build

# Modo desarrollo
npm run dev

📄 Licencia

MIT © Barbarred

🤝 Contribuciones

Las contribuciones son bienvenidas. Por favor:

  1. Fork el proyecto
  2. Crea una rama para tu feature (git checkout -b feature/AmazingFeature)
  3. Commit tus cambios (git commit -m 'Add some AmazingFeature')
  4. Push a la rama (git push origin feature/AmazingFeature)
  5. Abre un Pull Request

🐛 Reportar bugs

Si encuentras un bug, por favor abre un issue en el repositorio de GitHub.

⭐ Soporte

Si este paquete te fue útil, considera darle una estrella en GitHub.