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

@mgadev/habbo-ui

v0.6.2

Published

Historical Habbo-inspired React UI components organized by year

Readme

@mgadev/habbo-ui

Componentes React de Habbo organizados por año. Requiere React 18.2 o 19.

Documentación y ejemplos en Storybook

Instalación

npm install @mgadev/habbo-ui react react-dom
import { RoomsCard, TagsCard } from '@mgadev/habbo-ui/2008';
import '@mgadev/habbo-ui/2008/styles.css';

export function Example() {
  return <RoomsCard
    recommended={[{ id: 'room', name: 'My room', owner: 'RetroHabbo' }]}
    onEnter={room => console.log(room.id)}
  />;
}

Ediciones

  • /2003: Panel, OnlinePanel, HelpPanel, Navigation, NewsCard, PromoCard, Button, CheckInButton, Hero, Logo, Typography, ContactForm, WeekSelector y Page. GIF y fondo incluidos; estilos aislados.
  • /2006: Button, Panel (Header, Body, Footer), Window (Header, Content, Footer), Tabs; GoldCard, SnowCard, WelcomeCard, WinterCard, HappeningsCard, ECard, NewsCard, PromoLink, ScoreTable, ScoresCard y Navigation. Conserva la hoja histórica global; úsala en una página dedicada.
  • /2008: Button, Card, Alert, Field, Tabs, LoginForm, Dialog; HelpBubble, Tooltip, Pagination, TagCloud, TagsCard, SelectField, TextareaField, Checkbox, Radio, SettingsForm, RoomsCard, GroupsCard, HabbosCard, PromotionCard, NewsPromo, Navigation, Header y AvatarEditor. CSS aislado.

Importa el CSS de la misma edición: @mgadev/habbo-ui/2003/styles.css, /2006/styles.css o /2008/styles.css. La raíz exporta editions, no componentes. Todos los componentes y sus props se tipan con TypeScript.

Comportamiento

Los formularios entregan valores mediante onSubmit; no incluyen backend. Pagination es controlada mediante page y onPageChange. RoomsCard entrega la sala a onEnter; TagsCard entrega consultas a onSearch. Las pestañas incluyen navegación de teclado. Tooltip se abre con foco/hover y cierra con Escape; admite placement="top" (por defecto) o "bottom", ajusta la posición a la pantalla y mantiene la punta hacia el botón; Dialog contiene el foco y permite arrastrar su cabecera.

Las noticias y promociones usan imágenes locales por defecto y mantienen su ancho de referencia con un límite del 100% del contenedor. HabbosCard recibe avatares mediante image; sin imagen utiliza el esqueleto histórico como fallback. Los enlaces, avatares y datos de servidor se proporcionan por props.

Storybook del repositorio

pnpm storybook compila la biblioteca e inicia el catálogo en http://localhost:6006. Las historias se agrupan en 2003, 2006 y 2008, con controles, variantes y ejemplos interactivos. pnpm build-storybook comprueba tipos y genera apps/docs/storybook-static. Storybook aísla la hoja global de 2006 bajo su decorador de edición.

Proyecto no afiliado a Habbo. Los recursos históricos conservan los derechos de sus respectivos propietarios.

Card de Habbo Club (2008)

<Card variant="hc" title="Habbo Club">...</Card> utiliza la superficie hcred de HoloCMS: cabecera roja, fondo #FFE8B7 y el patrón original hc_pattern.gif incluido en el paquete. Storybook la muestra en 2008/Card → Habbo Club · HC.

AvatarEditor (2008)

Importa AvatarEditor desde @mgadev/habbo-ui/2008 y carga el CSS de 2008. Sirve los archivos del vestidor histórico desde el mismo origen en /habbo-2008/avatar-editor/. Si usas otra ruta, pasa la URL de editor.html en editorUrl. El vestidor carga Ruffle y la vista previa usa Habbo Imaging.

import { useState } from 'react';
import { AvatarEditor } from '@mgadev/habbo-ui/2008';
import '@mgadev/habbo-ui/2008/styles.css';

export function CrearHabbo() {
  const [avatar, setAvatar] = useState({ figure: '', url: '' });

  return (
    <>
      <AvatarEditor
        showExpressionControls={true}
        showPreview={true}
        showOutput={false}
        onChange={setAvatar}
      />
      <button type="button" onClick={() => console.log(avatar)}>
        Usar este avatar
      </button>
    </>
  );
}

Si omites initialFigure, o le pasas una cadena vacía o solo espacios, se usa hd-180-1.ch-210-66.lg-270-82.sh-290-77.hr-100-. Puedes pasar otro código como inicializador.

<AvatarEditor initialFigure="hd-180-2.ch-235-62.lg-281-62.sh-290-62.hr-165-34" />

| Prop | Valor por defecto | Uso | | --- | --- | --- | | initialFigure | Look indicado arriba | Código de apariencia inicial. | | initialGender | "M" | Género inicial, "M" o "F". | | allowClub | true | Permite seleccionar prendas HC. | | editorUrl | "/habbo-2008/avatar-editor/editor.html" | URL del vestidor servido desde el mismo origen. | | showExpressionControls | true | Muestra los selectores de expresión, postura y dirección. Al ocultarlos, la URL omite expresión y acción. | | showPreview | true | Muestra la imagen externa de Habbo Imaging centrada en su contenedor y con su proporción original. | | showOutput | true | Muestra los campos de código y URL con sus botones de copia. | | onChange | Opcional | Recibe { figure: string, url: string } al iniciar y cuando cambia alguno de esos valores, incluso con los campos ocultos. |

La vista previa permite elegir expresión neutral, feliz, triste, enojado, sorprendido, ojos cerrados o hablando. Las acciones incluyen estar de pie, sentado, acostado, caminando, saludando, sentado y saludando, riendo, dando respeto, sosteniendo un objeto y bebiendo. Las dos últimas usan el objeto con ID 1. El selector de dirección y las flechas giran cabeza y cuerpo juntos entre ocho orientaciones.

El código figure describe la ropa y los colores. La URL incluye además la dirección, expresión y acción seleccionadas. La figura dentro del vestidor SWF sigue visible al ocultar la vista previa externa con showPreview={false}.

El vestidor histórico usa sus SWF y XML locales y carga Ruffle desde jsDelivr. La vista previa requiere acceso a Habbo Imaging. Los archivos del vestidor se sirven por separado del paquete npm.