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

guiblocks

v0.1.0

Published

A lightweight JavaScript UI component library for building web interfaces with modular blocks.

Readme

GuiBlocks

npm version License: MIT

GuiBlocks は、JavaScript で動的に GUI を構築するための軽量ライブラリです。HTML を直接記述することなく、JavaScript のコードで Web アプリケーションの UI を構成できます。 このライブラリは Java の Swing に影響を受けて設計しており、オブジェクト指向でコンポーネントを組み合わせて UI を構築できるようになっています。

詳しい説明は、Github Pagesで解説しています。

特長

  • 部品(コンポーネント)を組み立ててGUIを構築
  • PC、スマホのようなレスポンシブデザインに対応
  • Canvas、ファイル操作、カラーピッカーなど豊富な部品
  • 独自のレイアウト制御:IN / RIGHT / NEWLINE

利用方法

ステップ1:ライブラリの選択と読み込み

  • cjs/ – CommonJS(Node.js等向け)
  • esm/ – ES Modules(モダンブラウザ向け)
  • umd/ – UMD(HTMLスクリプトタグ向け)

いずれかの中にある GuiBlocks.js または GuiBlocks.min.js を利用してください。

ステップ2:CSSの適用

GUI の外観を整えるために、GuiBlocks.css を HTML に読み込みます。

<link rel="stylesheet" href="./build/umd/GuiBlocks.css">

ステップ3:ライブラリの読み込み

<script src="./build/umd/GuiBlocks.min.js"></script>

またはモジュール形式で

import Blocks from "./build/esm/GuiBlocks.js";

使用例

const panel = new Blocks.Panel("デモパネル");
panel.putMe("container_id", Blocks.PUT_TYPE.IN);

const label = new Blocks.Label("こんにちは");
const button = new Blocks.Button("クリック");

panel.put(label, Blocks.PUT_TYPE.IN);
label.put(button, Blocks.PUT_TYPE.RIGHT);

button.addListener(() => {
  alert("クリックされました!");
});

主なコンポーネント一覧

クラス名は SLabel ですが GuiBlocks.Label のようにアクセスできます。

| コンポーネント名 | 説明 | | ---------------------------------- | -------------- | | SPanel, SGroupBox | 枠付きコンテナ | | SSlidePanel | 開閉式のスライドパネル | | SLabel, SButton | テキスト表示・クリック操作 | | SCheckBox, SComboBox | 入力選択用UI | | SSlider, SProgressBar | 数値入力・進捗表示 | | SFileLoadButton, SFileSaveButton | ファイル読み込み・保存操作 | | SCanvas, SCanvasGL | 2D描画およびWebGL描画 | | SImagePanel | 画像表示 | | SColorPicker | 色の選択 |