❯ tui.builders
SuperLightTUI搭載 — unsafeを使わない即時モードRust TUIライブラリ。50+ウィジェット、ライブプレビュー、本番コードをエクスポート。Ink (TypeScript) にも対応。
無料・サインアップ不要・ オープンソース
よく使うTUIパターン向けの事前構築レイアウト。エディタで開いて調整し、エクスポートできます。
ワークフロー
01. 設計
02. 設定
let mut ui = Context::new();
ui.col(|ui| {
ui.text("Hello");
});
03. エクスポート
04. 実行
1つのエディタに4つの機能。視覚的に設計し、プロパティを確認し、Rustへ出力し、テーマを切り替えます。
ウィジェット
+11 さらに
パレットからキャンバスへウィジェットをドラッグします。コンテナをネストして複雑なレイアウトも作成できます。
プロパティ
タイプ
container名前
方向
間隔
パディング
ボーダー
各ウィジェットのAPIはすべて視覚的なコントロールとして利用できます。方向、余白、色、ボーダーまで編集可能です。
use slt::{Context, Border, Color};
fn main() -> std::io::Result<()> {
let mut count: i32 = 0;
slt::run(|ui: &mut Context| {
if ui.key('q') { ui.quit(); }
if ui.key('k') { count += 1; }
ui.bordered(Border::Rounded)
.pad(1).gap(1).col(|ui| {
ui.text("Counter")
.bold().fg(Color::Cyan);
ui.row(|ui| {
ui.text("Count:");
ui.text(format!("{count}"))
.bold().fg(Color::Green);
});
});
})
}生成コードは実際のSuperLightTUI APIを使用します。コピーしてプロジェクトに貼り付け、cargo runで実行できます。
SLTライブラリに含まれる7つのテーマを搭載。ワンクリックで切り替え、即座にプレビューできます。
tui.builders で作られた例
ダッシュボード
システムモニター
チャットアプリケーション
ファイルエクスプローラー
基盤: SuperLightTUI - 即時モードのRust TUIフレームワーク。依存は2つ、unsafeはゼロ、60fpsレンダーループ。
Ink (TypeScript) Beta
Same visual editor, same drag-and-drop. Export as a React-based terminal app powered by Ink.
44 widgets · ink v6 · TypeScript
Try Ink Editorimport React from 'react';
import { render, Box, Text, useApp } from 'ink';
function App() {
const { exit } = useApp();
return (
<Box flexDirection="column" padding={1}
borderStyle="round" borderColor="cyan">
<Text bold color="green">
Hello from tui.builders
</Text>
<Text dimColor>
Press q to quit
</Text>
</Box>
);
}
render(<App />);ひとつのビルダー、すべてのTUIフレームワーク
一度デザインして、お好みのスタックにエクスポート。SuperLightTUIから始まり、さらに多くのフレームワークに対応予定。
ターミナルUIを作り始めよう
無料、オープンソース、アカウント不要