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 🙏

© 2025 – Pkg Stats / Ryan Hefner

ginga-ui

v0.8.1

Published

brand-new UI component library for web

Downloads

159

Readme

Ginga UI

version npm version GitHub License Lint Code Base Publish Package to npmjs

Ginga UI is an UI component library for React. This libarary is using LLM to styling components. Components will design based on the Website contents or user's prompt.

Ginga (/ɡiɴɡa/) is a Japanese word meaning "galaxy".

Recommended Environment

Frameworks

  • React 18
  • Next.js 13 or Next.js 14 with App Router (not supported with Next.js 15)
  • React with Vite

Browsers

  • Chrome on macOS, Windows, and Android
  • Firefox on macOS and Windows
  • Safari on macOS, iOS, and iPadOS
  • Edge (chromium) on Windows

Installation

1. Install the package

npm install ginga-ui

2. Import CSS file on root component

If you are using Next.js App Router, you can import CSS files in the layout.tsx file.

import "ginga-ui/style.css";
import "ginga-ui/variables.css";

3. Import components

import { Button } from "ginga-ui/core";

const CustomButton = () => {
  return <Button>Button</Button>;
};

export default CustomButton;

Theme Generation

You can generate with your own theme by using ThemeClient class.

import ThemeClient from "ginga-ui/ai";

const themeClient = new ThemeClient({
  clientType: "openai",
  apiKey: "YOUR_OPENAI_API_KEY",
});

const CustomButton = () => {
  const handleClick = async () => {
    await themeClient.generateTheme("the image of you thought");
  };

  return <Button onClick={handleClick}>Button</Button>;
};

export default CustomButton;

If you want to call on client side, you can use dangerouslyAllowBrowser option.

[!CAUTION] This is extremely dangerous because it allows users to access the API key. Use this option only when you are developing locally.

const themeClient = new ThemeClient({
  clientType: "openai",
  apiKey: "YOUR_OPENAI_API_KEY",
  dangerouslyAllowBrowser: true,
});

const handleClick = async () => {
  await themeClient.generateTheme("the image of you thought");
};

SSR Mode

If you want to generate theme on server side, you can write like this. Recommended to use with Next.js App Router and write this on page component.

import { Button } from "ginga-ui/core";
import ThemeClient from "ginga-ui/ai";

export default async function Home() {
  const themeClient = new ThemeClient({
    clientType: "openai",
    apiKey: process.env.OPENAI_API_KEY!,
  });

  const { CSSCode } = await themeClient.generateTheme("fairy tale");

  return (
    <div>
      <style>{CSSCode}</style>
      <Button>Button</Button>
    </div>
  );
}

Client Types

ThemeClient supports two client types: gemini and openai. You can specify the client type when creating an instance of ThemeClient.

Gemini Client

import ThemeClient from "ginga-ui/ai";

const themeClient = new ThemeClient({
  clientType: "gemini",
  apiKey: "YOUR_GEMINI_API_KEY",
});

const CustomButton = () => {
  const handleClick = async () => {
    await themeClient.generateTheme("the image of you thought");
  };

  return <Button onClick={handleClick}>Button</Button>;
};

export default CustomButton;

Variables

| Name | Description | Default Value | | -------------------- | ---------------- | ------------- | | --color-primary | Accent color | #1677ff | | --color-secondary | Main text color | #000000 | | --color-background | Background color | #ffffff | | --width-border | Border width | 2px | | --size-radius | Border radius | 1rem | | --font-family | Font family | sans-serif |

Components

Usage of components can be found in the Storybook.

  • Accordion
  • Box
  • Button
  • Card
  • Checkbox
  • Dialog
  • FormControl
  • Heading
  • Image
  • Input
  • Link
  • List
  • Modal
  • Paragraph
  • Radio
  • Select
  • Slider
  • Switch
  • Tab
  • Table