skillZs
★ LIVE SKILL TAGS ★
>>> LIVE SKILLS INDEX <<<
* OPEN SOURCE *
NO LOGIN, NO TRACKING
※ REAL INSTALL DATA ※
← back to all skills
longbridge/gpui-kit298 installs

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.

How do I install this agent skill?

npx skills add https://github.com/longbridge/gpui-kit --skill gpui-component
view source ↗

Is this agent skill safe to install?

  • Gen Agent Trust Hubpass

    The gpui-component skill provides comprehensive guidance and normative standards for using the gpui-component UI library. It is well-structured and adheres to professional development practices. The skill includes instructions to fetch supplementary documentation from an external website, which introduces a minor indirect prompt injection surface—a common characteristic of documentation-fetching skills that is generally considered a low risk.

  • Socketpass

    No alerts

  • Snykwarn

    Risk: MEDIUM · 2 issues

What does this agent skill do?

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://gpui-kit.com/llms-full.txt
  • Per-component API: fetch https://gpui-kit.com/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

Add the canonical catalog link to the repository README so users can inspect current installs and available audits. The publishing guide covers the complete discovery path.

<a href="https://skillzs.dev/skills/longbridge/gpui-kit/gpui-component">View gpui-component on skillZs</a>