本文へ移動
cccskills
無料GitHub で公開日本語紹介

gpui-component

GPUIアプリのUIをgpui-componentで組み立てる際に、コンポーネントの選び方や状態管理、テーマ、レイアウト、操作設計、実装規約を確認できます。

原文原文の説明を見る

How to use the gpui-component UI library in GPUI applications, and the normative Design and Coding Guides that govern it. Use when building UIs with gpui-component components (Button, Input, Select, Dialog, Tabs, Sidebar, List, Table, etc.), setting up the library, handling component state or theming, finding the right component for a UI need, and also when designing layouts, spacing, visual hierarchy, or interaction states, writing interface copy, or making application architecture, state-ownership, or public API decisions.

feigeCode/navopスター 1,964(GitHub 1,964 + cccskills 0)

実行スコア 未検証

インストール方法を見る

こんなときに便利

  • 画面に合う部品を選びたいとき
  • コンポーネントをセットアップしたいとき
  • 状態管理やテーマを確認したいとき
  • レイアウトや操作状態を設計したいとき
  • アプリ構成や公開APIを検討するとき

日本語での紹介

できること

GPUIアプリでgpui-componentを使うためのコンポーネント選択、セットアップ、状態管理、テーマ設定を案内します。Button、Input、Select、Dialog、Tabs、Sidebar、List、Tableなどの用途を確認でき、フォーム、通知、ポップアップ、ナビゲーション、データ表示、チャートも扱います。画面を変更する前には、デザインガイドとコーディングガイドの該当箇所を確認する前提です。ガイドはレイアウトや余白、視覚的な優先順位、操作状態、状態の所有場所、公開APIなどの判断基準を示します。

こんなときに便利

GPUIで画面を新しく作るとき、既存画面にコンポーネントを追加するとき、UIの一貫性やアプリ構成を検討するときに向いています。部品のAPIや使い分けを確認したい開発者にも役立ちます。

使い方の例

  • 「この画面に合うgpui-componentの部品を選んで」
  • 「入力フォームの状態管理とテーマ設定を確認して」
  • 「このレイアウトをデザインガイドに沿って見直して」

注意点

gpui-componentを使うGPUIアプリが対象です。UIやアーキテクチャを変更する前に、付属のガイドを確認する必要があります。

この紹介文は、公開されている SKILL.md をもとに AI(OpenAI Codex)が作成しました。正確な仕様は下の原文を確認してください。

含まれるファイル(5)

  • SKILL.md8.5 KB
  • references/coding-guides.md40.0 KB
  • references/design-guides.md46.0 KB
  • references/style-guide.md9.3 KB
  • references/usage.md10.0 KB

SKILL.md(原文)

インストールする前に、エージェントに与えられる指示の中身を確認できます。

Read This First

Before changing UI, interaction, interface language, layout, styling, components, or application architecture, read the relevant guide:

GuideRead before
Design GuidesChoosing components, layout, spacing, hierarchy, color, density, interaction states, overlays, interface copy
Coding GuidesCrate layering, RenderOnce vs Entity<T>, state ownership, ElementId, focus, async, public API, testing

These guides are requirements, not optional inspiration. Do not copy generic web conventions, infer a design system from one existing screen, or add a control merely because the underlying feature exists. Review the finished work against both guides before considering it complete.

Read the guide file itself. Do not answer from what this page summarizes, from an existing screen in the codebase, or from training data — those are the three ways the guides get quietly ignored.

Non-negotiables

These are a floor, not a substitute. Read the guide for anything past this list.

  • Never invent an API. Search the current source for the real signature. Do not translate a React, CSS, or older-GPUI example by analogy — a plausible-looking method name that does not exist is the most common failure mode here.
  • Desktop before web convention. Keyboard access, window chrome, menus, dense data views, resizable regions, persistent navigation.
  • Button vs Link. Button for every in-app command — use ghost or outline when it should read quietly. Link only for external URLs and email addresses.
  • Tokens before values. No raw hex or rgb(...) in application UI; use cx.theme() semantic tokens. Use rem-based helpers (p_2(), gap_3(), text_sm()) so window zoom works. Any spacing number you see quoted is the current default scale, not a literal to repeat.
  • State must be visible. Hover, focus, selection, disabled, loading, validation, and destructive states each need distinct, consistent treatment.
  • Stable identity. Repeated elements need domain-derived ElementIds, not list indexes.
  • Overlays. Escape dismisses the topmost surface and returns focus to its trigger.
  • Copy. Name the object and the verb — Delete “Roadmap”? with a Delete button, not Are you sure? with OK.

Documentation

  • Full reference: fetch https://longbridge.github.io/gpui-component/llms-full.txt
  • Per-component API: fetch https://longbridge.github.io/gpui-component/docs/components/{name}.md
    • e.g. button.md, input.md, select.md, dialog.md, data-table.md
  • Any site page can be fetched as Markdown by appending .md to the URL

Quick Reference

Setup — always required:

gpui_component::init(cx);               // in app.run(), must be first
Root::new(view, window, cx)             // first-level view in every window

Stateless — use directly in render:

Button::new("id").primary().label("OK").on_click(|_, _, _| {})

Stateful — hold Entity<State> in struct, pass ref in render:

// in new():  let input = cx.new(|cx| InputState::new(window, cx));
// in render: Input::new(&self.input)

Sizes: .xsmall() .small() .medium() (default) .large()

Theme: cx.theme().primary · .background · .foreground · .border · .muted

Component Catalog

When you need a component, find it here. For full API, fetch its .md doc.

Input & Form

ComponentImportNotes
Inputinput::{Input, InputState}Stateful. Text, password, mask, validation
NumberInputinput::{NumberInput, NumberInputEvent}Stateful. Numeric with step
OtpInputinput::OtpInputStateful. One-time password
Selectselect::{Select, SelectState}Stateful. Dropdown picker
Comboboxcombobox::{Combobox, ComboboxState}Stateful. Searchable select
Checkboxcheckbox::CheckboxStateless. `on_click(
Switchswitch::SwitchStateless. Toggle
Radioradio::{Radio, RadioGroup}Stateless.
Sliderslider::{Slider, SliderState}Stateful.
Togglebutton::ToggleStateless.
Ratingrating::RatingStateless.
Stepperstepper::StepperStateless. Increment/decrement
ColorPickercolor_picker::{ColorPicker, ColorPickerState}Stateful.
DatePickerdate_picker::{DatePicker, DatePickerState}Stateful.
Formform::{v_form, h_form, field}Layout container for form fields

Display & Feedback

ComponentImportNotes
Buttonbutton::{Button, ButtonGroup}Stateless. Primary UI action
Icon{Icon, IconName}Stateless. Lucide icons
Badgebadge::BadgeStateless.
Tagtag::TagStateless. Closable tags
Avataravatar::AvatarStateless.
Labellabel::LabelStateless. Form label
Kbdkbd::KbdStateless. Keyboard key display
Alertalert::AlertStateless. Info/success/warning/error
Spinnerspinner::SpinnerStateless. Loading indicator
Skeletonskeleton::SkeletonStateless. Loading placeholder
Progressprogress::{Progress, ProgressCircle}Stateless.
Tooltiptooltip::TooltipVia .tooltip() on elements
HoverCardhover_card::{HoverCard, HoverCardState}Stateful.
Clipboardclipboard::ClipboardStateless. Copy button

Overlay & Popups

ComponentImportNotes
Dialogdialog::Dialog + WindowExtVia window.open_dialog(...)
AlertDialogWindowExtVia window.open_alert_dialog(...)
Sheetsheet::Sheet + WindowExtSide panel, via window.open_sheet(...)
Notificationnotification::Notification + WindowExtVia window.push_notification(...)
Popoverpopover::PopoverFloating overlay
Menumenu::{PopupMenu, DropdownMenu}Context menus
DropdownButtonbutton::DropdownButtonButton with dropdown menu

Navigation & Layout

ComponentImportNotes
Tabs / TabBartab::{Tab, TabBar}Tabbed interface
Sidebarsidebar::{Sidebar, SidebarMenu, ...}App navigation panel
TitleBarTitleBarWindow title bar
Breadcrumbbreadcrumb::BreadcrumbNavigation breadcrumb
Paginationpagination::PaginationPage navigation
Accordionaccordion::AccordionCollapsible sections
Collapsiblecollapsible::CollapsibleSingle collapsible
GroupBoxgroup_box::GroupBoxLabeled container
Resizableresizable::{h_resizable, v_resizable, resizable_panel, ResizableState}Draggable split panes
Scrollablescroll::ScrollbarCustom scrollbar
FocusTrapgpui_base::focus_trap::FocusTrapElementKeyboard trap for modals

Data Display

ComponentImportNotes
DataTabletable::{DataTable, TableState, TableDelegate}Stateful. Full-featured table
Tabletable::{Table, ...}Simpler table
VirtualList{v_virtual_list, h_virtual_list}High-perf large lists
Listlist::{List, ListState, ListDelegate}Stateful. Searchable list
Treetree::{Tree, TreeState, TreeItem, TreeEntry}Stateful. Hierarchy
DescriptionListdescription_list::DescriptionListKey-value pairs
Settingssetting::SettingsSettings panel

Charts

ComponentImportNotes
Chartchart::{AreaChart, BarChart, LineChart, PieChart, RadarChart}Bar, line, area, pie charts
Plotplot::Plot#[derive(IntoPlot)] for data

Reference Files

  • usage.md — setup patterns, component types, common examples
  • style-guide.md — code style for contributors

レビュー

まだレビューはありません。使ってみた感想をお寄せください。

コメント

ログインなしで書き込めます。使ってみた感想、質問、動かなかった環境などを気軽にどうぞ。

まだコメントはありません。最初のコメントを書いてみませんか。

送信するとすぐに公開されます。メールアドレスや電話番号などの個人情報は書かないでください。URL は 2 つまでです。

0 / 1000 文字

このフォームは reCAPTCHA で保護されており、Google のプライバシーポリシーと利用規約が適用されます。

同じリポジトリのスキル

connection-import-wasm

無料概要あり

DBeaverやNavicatなどの接続情報を取り込むWASM拡張の実装から、マニフェスト設定、ホスト連携、表示やプレビューの不具合調査まで扱います。

  • 新しい接続インポーターを作りたいとき
  • WASM拡張が表示されない原因を調べたいとき
  • 接続プレビューの停止を調査したいとき
feigeCode/navop1,9642026年10月26日 更新

gpui

無料概要あり

GPUIアプリの開発で、キー操作や画面レイアウト、状態管理、イベント、テストなどのAPIや実装パターンを調べ、必要な知識を参照できます。

  • GPUIのAPIを調べたいとき
  • キー操作やフォーカスを実装したいとき
  • イベントや状態を管理したいとき
feigeCode/navop1,9642026年10月26日 更新

ipc-driver-development

無料概要あり

onetcliのIPCデータベースドライバーを、マニフェストやJSON-RPCの契約に沿って設計・実装・レビューし、メタデータ、DDL、入出力や配布まで扱うスキルです。

  • IPCデータベースドライバーを新規作成したいとき
  • driver.jsonの機能やメソッドを設計したいとき
  • スキーマやDDLの不具合を調べたいとき
feigeCode/navop1,9642026年10月26日 更新

navop

無料概要あり

起動中のNavopデスクトップアプリが公開するリソースや操作を、CLIから確認して実行できます。利用可能なツールや権限を調べ、承認に沿って処理を進めます。

  • Navopの利用可能なツールを調べたいとき
  • 操作前に入力スキーマを確認したいとき
  • Navop経由でリソースを操作したいとき
feigeCode/navop1,9642026年10月26日 更新

navop-release-notes

無料概要あり

Navopの変更内容を中国語と英語でまとめ、CHANGELOG.mdを基準にGitHub ReleasesやR2のリリースノートを準備・確認するスキルです。

  • Navopの二言語リリースノートを作りたいとき
  • CHANGELOG.mdの項目を確認したいとき
  • タグ作成前にリリース内容を整理したいとき
feigeCode/navop1,9642026年10月26日 更新

new-component

無料概要あり

既存の実装やデザイン規則に沿って、GPUIの新しいUIコンポーネントを設計・実装し、関連ドキュメントとストーリーも用意するスキルです。

  • GPUIに新しいUI部品を追加したいとき
  • 状態を持つかどうか判断したいとき
  • 既存の部品とAPIや見た目をそろえたいとき
feigeCode/navop1,9642026年10月26日 更新

feigeCode のスキルをすべて見る

このスキルの問題を報告する