Now liveThe Skillselion MCP - thousands of ranked skills, loaded into your agent mid-task. No install.Get it →
longbridge avatar

Gpui Component

  • 114 installs
  • 12.4k repo stars
  • Updated August 4, 2026
  • longbridge/gpui-component

Build new GPUI controls in Rust with the same structure, traits, and checklist Longbridge uses for Button, Input, and Select-style components.

About

GPUI Component is an agent skill that encodes Longbridge’s internal code style for Rust GPUI UI primitives so solo builders cloning or extending gpui-component can match production patterns. It is for developers shipping desktop or embedded-agent UIs on GPUI who need consistency across Button, Checkbox, Input, Select, and similar controls—not for web React stacks. Invoke it when scaffolding a new interactive element, aligning variants and disabled states, or reviewing a PR that diverges from FluentBuilder and theme conventions. The guide walks through struct field ordering, required trait implementations, size handling, and applying user style refinements without fighting the framework. On Prism it lives on Build → Frontend as a niche but high-signal reference for the Rust GPUI ecosystem. It does not replace GPUI API docs or design mocks; it standardizes how code should look and behave in the Longbridge ui crate style.

  • Documents standard stateless GPUI component anatomy (identity, config, content, callbacks)
  • Requires and optional traits: Sizable, Disableable, StyledExt, FluentBuilder conditionals
  • Variants pattern and callback signatures aligned with crates/ui components
  • Checklist for new components including theme colors and user style overrides
  • Import organization and doc-comment conventions for RenderOnce GPUI elements

Gpui Component by the numbers

  • 114 all-time installs (skills.sh)
  • +16 installs in the week ending Aug 2, 2026 (Skillselion tracking)
  • Ranked #62 of 121 Rust skills by installs in the Skillselion catalog
  • Data as of Aug 5, 2026 (Skillselion catalog sync)
npx skills add https://github.com/longbridge/gpui-component --skill gpui-component

Add your badge

Show developers this skill is listed on Skillselion. Paste this into your README.

Listed on Skillselion
Installs114
repo stars12.4k
Last updatedAugust 4, 2026
Repositorylongbridge/gpui-component

What it does

Build new GPUI controls in Rust with the same structure, traits, and checklist Longbridge uses for Button, Input, and Select-style components.

Files

SKILL.mdMarkdownGitHub ↗

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
NumberInputnumber_input::{NumberInput, NumberInputState}Stateful. Numeric with step
OtpInputotp_input::{OtpInput, OtpInputState}Stateful. 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.
Toggletoggle::ToggleStateless.
Ratingrating::RatingStateless.
Stepperstepper::StepperStateless. Increment/decrement
ColorPickercolor_picker::{ColorPicker, ColorPickerState}Stateful.
DatePickertime::date_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::{ProgressBar, ProgressCircle}Stateless.
Tooltiptooltip::TooltipVia .tooltip() on elements
HoverCardhover_card::{HoverCard, HoverCardState}Stateful.
Imageimage::ImageStateless.
Clipboardclipboard::ClipboardStateless. Copy button

Overlay & Popups

ComponentImportNotes
Dialogdialog::Dialog + WindowExtVia window.open_modal(...)
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
TitleBartitle_bar::TitleBarWindow title bar
Breadcrumbbreadcrumb::BreadcrumbNavigation breadcrumb
Paginationpagination::PaginationPage navigation
Accordionaccordion::AccordionCollapsible sections
Collapsiblecollapsible::CollapsibleSingle collapsible
GroupBoxgroup_box::GroupBoxLabeled container
Resizableresizable::ResizableDraggable split panes
Scrollablescroll::ScrollbarCustom scrollbar
FocusTrapfocus_trap::FocusTrapKeyboard 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, TreeDelegate}Stateful. Hierarchy
DescriptionListdescription_list::DescriptionListKey-value pairs
Settingssettings::SettingsSettings panel

Charts

ComponentImportNotes
Chartchart::ChartBar, 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

Related skills

Rustfrontend

This week in AI coding

Five minutes, every Monday - the tools, releases and tactics for developers.

unsubscribe anytime.