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

@yuske-nakajima/tileui

v0.2.5

Published

A grid-tile GUI panel with SVG rotary knobs for creative coding

Readme

tileui

CI

デモ

CSS Grid タイル型 + SVG ノブの GUI パネルライブラリ

TileUI デモ

特徴

  • CSS Grid による正方形タイルレイアウト
  • SVG 回転ノブで直感的な数値操作(270度可動)
  • ゼロ依存、軽量
  • CSS 変数によるテーマカスタマイズ
  • lil-gui / dat.gui 風の簡潔な API
  • ESM / UMD 両対応、TypeScript 型定義付き

インストール

npm install @yuske-nakajima/tileui

CDN

<!-- UMD -->
<script src="https://unpkg.com/@yuske-nakajima/tileui"></script>
<script>
  const gui = new TileUI();
</script>

<!-- ESM -->
<script type="module">
  import TileUI from 'https://cdn.jsdelivr.net/npm/@yuske-nakajima/tileui/dist/tileui.js';
</script>

クイックスタート

import TileUI from '@yuske-nakajima/tileui';

const params = { speed: 0.5, volume: 80, color: '#ff0000', enabled: true };

const gui = new TileUI({ title: 'Controls' });

// 数値(ノブ): min, max, step を指定
gui.add(params, 'speed', 0, 1, 0.01).onChange((v) => console.log('speed:', v));

// 数値(入力欄): min/max なし
gui.add(params, 'volume');

// カラーピッカー
gui.addColor(params, 'color');

// トグルスイッチ
gui.addBoolean(params, 'enabled');

// ボタン
gui.addButton('Reset', () => console.log('reset!'));

// フォルダ(サブグリッド)
const folder = gui.addFolder('Advanced');
folder.add(params, 'speed', 0, 1, 0.01);

API リファレンス

new TileUI(options?)

GUI パネルを作成する。

| オプション | 型 | デフォルト | 説明 | |-----------|-----|----------|------| | container | HTMLElement | document.body | パネルの挿入先 | | columns | number | auto-fill | グリッドの列数 | | title | string | — | パネルのタイトル |

gui.add(obj, prop, min?, max?, step?)

数値コントローラーを追加する。min/max を指定すると SVG ノブ、省略すると数値入力欄になる。

gui.addBoolean(obj, prop)

トグルスイッチを追加する。

gui.addColor(obj, prop)

カラーピッカーを追加する。

gui.addButton(label, callback)

クリック可能なボタンタイルを追加する。

gui.addFolder(title)

サブグリッド(フォルダ)を追加する。戻り値は新しい TileUI インスタンス。

gui.updateDisplay()

全コントローラーの表示を現在のオブジェクト値に同期する。

gui.dispose()

全コントローラーと DOM 要素をクリーンアップする。

controller.onChange(callback)

値変更時のコールバックを設定する。メソッドチェーン対応。

gui.add(params, 'speed', 0, 1).onChange((v) => {
  // v: number
});

テーマカスタマイズ

CSS 変数をオーバーライドすることで、パネルの見た目をカスタマイズできる。

:root {
  --tileui-tile-size: 120px;
  --tileui-bg: #1a1a2e;
  --tileui-tile-bg: #16213e;
  --tileui-tile-bg-hover: #1c2a4a;
  --tileui-border: #0f3460;
  --tileui-text: #e0e0e0;
  --tileui-text-muted: #8a8a9a;
  --tileui-accent: #0ea5e9;
  --tileui-knob-track: #2a2a4a;
  --tileui-knob-value: var(--tileui-accent);
  --tileui-knob-thumb: #ffffff;
  --tileui-toggle-off: #3a3a5a;
  --tileui-toggle-on: var(--tileui-accent);
  --tileui-radius: 4px;
  --tileui-font-size: 11px;
  --tileui-font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

開発

E2E テスト

demo ページの動作確認用に Playwright E2E テストを用意しています。CI には組み込んでいません。

# Chromium がインストールされていない場合
npx playwright install chromium

# E2E テスト実行(Vite dev server は自動起動)
npm run test:e2e

モバイル(Pixel 7 エミュレーション)とデスクトップ Chrome で実行されます。

ライセンス

MIT

English