Expand description
§arc-gpui — Unified Facade Crate for Arc-rs
Install a single dependency in Cargo.toml to access the entire Arc-rs ecosystem on GPUI:
[dependencies]
arc-gpui = "0.2.0"Disable the node-graph canvas if you only need UI components, tokens, and motion:
[dependencies]
arc-gpui = { version = "0.2.0", default-features = false }§Included Modules
tokens(arc-tokens): OKLCH/OKLab palettes, 8 semantic accents, radii, shadows, typography, i18n, spring specs.motion(arc-motion): analytical ODE spring solver, cubic bezier, FLIP shared layout, presence, drag/inertia.ui(arc-ui): 120+ interactive desktop components and charts, also re-exported at the crate root.flow(arc-flow, enabled by default via featureflow): GPU-accelerated node & workflow canvas.flow_core(arc-flow-core, enabled by default via featureflow): UI-agnostic graph kernel.gpui_kit: Underlying GPUI Kit runtime re-export.prelude: Common setup helpers, theme/locale traits, and core components.
Re-exports§
pub use arc_motion as motion;pub use arc_tokens as tokens;pub use arc_ui as ui;pub use gpui_kit;pub use arc_flow as flow;pub use arc_flow_core as flow_core;pub use arc_graph as graph;pub use arc_graph_core as graph_core;
Modules§
- actions
- Re-export all UI components & charts at the crate root for ergonomic imports
(
use arc_gpui::{Button, Toast, LineChart, ...};). Ported from Arc (MIT) © 2026 Elia Kuratli Action components (button,action-button,copy-button,split-button, …). - blocks
- Re-export all UI components & charts at the crate root for ergonomic imports
(
use arc_gpui::{Button, Toast, LineChart, ...};). Ported from Arc (MIT) © 2026 Elia Kuratli P7 桌面区块,复用 Arc 组件、tokens 和 motion。 - chart
- Re-export all UI components & charts at the crate root for ergonomic imports
(
use arc_gpui::{Button, Toast, LineChart, ...};). Ported from Arc (MIT) © 2026 Elia Kuratli Chart primitives and visualizations (Sparkline,Gauge,BarChart,LineChart,DonutChart,Streamgraph,BrushChart,Ridgeline,Treemap,WaffleChart,SlopeChart,ActivityHeatmap). - data
- Re-export all UI components & charts at the crate root for ergonomic imports
(
use arc_gpui::{Button, Toast, LineChart, ...};). Ported from Arc (MIT) © 2026 Elia Kuratli Data display components (avatar,avatar-group,card,metric-card,empty-state,tree-view, etc.). - disclosure
- Re-export all UI components & charts at the crate root for ergonomic imports
(
use arc_gpui::{Button, Toast, LineChart, ...};). Ported from Arc (MIT) © 2026 Elia Kuratli Disclosure & navigation components (tabs, etc.). - feedback
- Re-export all UI components & charts at the crate root for ergonomic imports
(
use arc_gpui::{Button, Toast, LineChart, ...};). Ported from Arc (MIT) © 2026 Elia Kuratli Feedback components (toast-stack, etc.). - inputs
- Re-export all UI components & charts at the crate root for ergonomic imports
(
use arc_gpui::{Button, Toast, LineChart, ...};). Ported from Arc (MIT) © 2026 Elia Kuratli Input components (switch,elastic-slider, etc.). - overlay
- Re-export all UI components & charts at the crate root for ergonomic imports
(
use arc_gpui::{Button, Toast, LineChart, ...};). Ported from Arc (MIT) © 2026 Elia Kuratli Overlay components (tooltip, laterpopover, menus, dialogs). - prelude
- Convenient prelude for bootstrapping an Arc-rs GPUI application.
- text
- Re-export all UI components & charts at the crate root for ergonomic imports
(
use arc_gpui::{Button, Toast, LineChart, ...};). Ported from Arc (MIT) © 2026 Elia Kuratli Text animation components (animated-counter,slot-text,text-*,in-view-title).
Structs§
- Action
Button - Arc
ActionButtonwithIdle -> Pending -> Success -> Idlechoreography, morphing label width, and hand-drawnpathLengthcheckmark. - Action
Swap - Arc
ActionSwap— compact multi-state morphing pill button. - Activity
Heatmap - Interactive GitHub-style
ActivityHeatmap. - Alert
- Arc
Alert— inline status message with tone icon, optional details and collapsing dismiss. - Animated
Counter - Arc
AnimatedCounter— odometer-style digits that roll toward the new value. - Announcement
Bar - Slim rotating announcement banner (
announcement-bar). - ArcDialog
- Arc
Dialog— modal dialog with spring entrance, backdrop dim,SwapTextheader transitions, and mid-exit click-through. - ArcHover
Card - Arc
HoverCard— rich preview anchored to a trigger after a short hover delay. - ArcOverlay
- Window-level layer that draws every Arc tooltip (registered as a root plugin).
- ArcPopover
- Arc
Popover— a click-anchored panel with Arc’s surface and entrance. - ArcTooltip
- Hover target for
ArcOverlay’s tooltip. - Avatar
- Arc
Avatar— circular user photo or initials with optional spring-animated status dot. - Avatar
Group - Arc
AvatarGroup— overlapping team avatar stack with hover nameplates and animated+Noverflow. - Badge
- Arc
Badge— status pill / categorical tag with Oklab tint formula and spring width morphing. - BarChart
- Billing
Toggle - Arc
BillingToggle— billing period pill switch with a critically damped sliding thumb and tinting savings badge. - Bottom
Sheet - Arc
BottomSheet— multi-detent bottom sheet with position-driven backdrop dim, iOS rubber-band stretch, velocity projection, and keyboard/click grabber controls. - Breadcrumb
- Arc
Breadcrumb— hierarchical location path with animated crumb insertion. - Brush
Chart - Arc
BrushChartcomponent. - Button
- Arc
Buttoncomponent with adaptive press scale, width-morphing label slot, loading spinner presence, and full keyboard/accessibility behavior. - Button
Group - Arc
ButtonGroupjoining segments into one surface with a travelling highlight pill, quiet hairline dividers, and optional trailing dropdown menu. - Calendar
- Arc
Calendar— a month grid with a sliding strip, a gliding selection disc, and keyboard grid navigation. - Card
- Content card with hover lift, animated status word-roll, and optional quick-look morph (
card). - Card
Stack - Arc
CardStack— triage card deck with drag-to-decide stamps, undo, and keyboard shortcuts. - Carousel
- Arc
Carousel— centered peeking slide track with momentum drag, pill dots, and autoplay. - Changelog
Entry - Changelog
Feed - Chat
Thread - Arc
ChatThread— grouped chat messages, reactions, read receipts, typing dots, and composer. - Checkbox
- Arc
Checkboxwith 3-state check/indeterminate 3-vertex morph and spring fill. - Chip
Group - Arc
ChipGroup— single or multi-select filter chips with spring check-slot growth, Oklab accent surface tinting,"+N more"overflow folding with pinned selections, andHeightFramesmooth row height morphing. - Code
Block - Syntax-highlighted source code viewer with copy button & collapsible footer (
code-block). - Color
Picker - Arc
ColorPicker— swatch trigger expanding into a 2D saturation/brightness area, hue & opacity sliders, multi-formatTextMorphreadout, WCAG contrast meter, and saved swatches. - Combobox
- Arc
Combobox— searchable single-value dropdown withAutoHeightspring listbox, muted selected-label placeholder while typing, animated clear button, and settled label rise. - Command
Item - A command-palette entry.
iconuses the GPUI Kit icon set as the native equivalent of Arc’sReactNodeicon slot. - Command
Palette - Arc
CommandPalette: inline searchable command list with grouped, ranked results. - Comment
Thread - Arc
CommentThread— nested replies,@mentionhighlighting, inline edit/delete, and resolve chip. - Comparison
Column - Comparison
Row - Comparison
Section - Comparison
Table - Confirm
Morph - In-place morphing confirmation pill (
confirm-morph). - Context
Menu - Arc
ContextMenu— wraps a target surface and opens a pointer-anchored floating menu on right click, left click, orShift+F10. - Cookie
Consent - Morphing cookie consent bar / preferences panel / floating reopen chip (
cookie-consent). - Copy
Button - Arc
CopyButtonwith OS clipboard write, hand-drawnpathLengthcheckmark, and zero-overshoot label width morphing. - Countdown
- Fixed-moment / duration countdown component (
countdown). - Date
Picker - Arc
DatePicker— a trigger + popover wrapping the ArcCalendar. - Date
Range Picker - Arc
DateRangePicker— a trigger + panel picking a start and end together. - Default
Node Renderer - 默认卡片:标题 + 状态点与状态文字。
- Donut
Chart - Drawer
- Arc
Drawer— edge-anchored sliding sheet with header pan-to-dismiss, rubber-banding, late shadow fade, andSwapTextheader transitions. - Dropdown
Menu - Arc
DropdownMenu— button trigger with spring label morph, rotating chevron, and a floating action menu with a gliding pointer / instant keyboard highlight pill. - Elastic
Slider - Arc
ElasticSlidercomponent with elastic overscroll, detents, velocity-swaying value bubble, and full keyboard navigation. - Empty
State - Centered empty-state container with smooth in-place copy, icon, and height transitions (
empty-state). - Empty
States - Expandable
Card - Arc
ExpandableCard— width + height morphing disclosure card with fixed-width inner layout, sequenced60msclose hold /120msopen fade-in, and rolling description swaps. - Expandable
Text - Arc
ExpandableText— multi-line clamp with soft bottom fade, distance-adaptive ease-out height glide, and a stable dual-label toggle button. - Expanding
Button Group - Arc
ExpandingButtonGroup: compact pill toolbar where one item is always expanded to reveal its label, neighbors slide smoothly onmotion.spring.morph, and actions withdone_labelconfirm in place with a drawn checkmark. - Expanding
Search - Arc
ExpandingSearch— an icon button that morphs into a grouped search field. - File
Dropzone - Arc
FileDropzone— a drop target with a staged file list and upload simulation. - File
Upload - File
Upload Item - Filter
Toolbar - Active filter chips strip with two-step Field -> Value
Add filtermenu (filter-toolbar). - Floating
Button Group - Arc
FloatingButtonGroup: separate soft buttons in a quiet or raised tray with one shared morphing highlight pill, fixed-width reserved label slots, and directional shortcut tooltips. - Flow
Canvas - Gauge
- Graph2D
- 2D 知识图谱画布。
- Hold
ToConfirm - Arc
HoldToConfirm— press-and-hold confirmation button with split-color advancing fill, spring rewind on early release, label width morph, and hand-drawn checkmark. - Icon
Morph - Arc
IconMorph— decorative stateful vector icon that springs smoothly between two states. Wrap in a button that owns the accessible name and pressed state. - Image
Compare - Interactive before/after comparison frame with horizontal/vertical split (
image-compare). - InView
Title - Arc
InViewTitle— a section title that reveals itself when it scrolls into view. - Inline
Edit - Arc
InlineEdit— click-to-edit text with save/rollback phases. - Input
- Arc
Input— single-line text field with Arc focus language and spring-animated helper/error copy. - Json
Viewer - Interactive collapsible JSON tree viewer with search, pagination & clipboard copy (
json-viewer). - Line
Chart - Mention
Input - Arc
MentionInput— a field with@people and#channel mentions. - Metric
Card - KPI metric card pairing
AnimatedCounterwith directional text swap & trend badge (metric-card). - Money
Input - Arc
MoneyInput— multi-currency amount field in minor units with ghost cents, place-value rolling digits, currency switcher listbox, quick-add chips, and limit-refusal kick. - Morph
Select - Arc
MorphSelect— a select whose trigger grows into the options surface, with a gliding highlight pill, optional inline search lid, and a lifted label that flies from the chosen row into the trigger. - Multi
Select - Arc
MultiSelect— multi-value selector with spring-expanding chip slots, directional+Noverflow count roll, trailing clear button, and self-drawing option checkmarks. - Node
Render Ctx - 渲染时传给节点的上下文。节点外框(位置、尺寸、ID、指针拦截)由画布提供, 渲染器只负责填满外框的内容。
- Notification
Actor - Notification
Center - Notification
Item - Number
Field - Arc
NumberField— bounded numeric stepper with place-value odometer wheels, dynamic character-keyed affixes, label scrubbing with asymptotic rubber-band resistance, and limit strain feedback. - Onboarding
Checklist - Getting-started checklist card (
onboarding-checklist). - OtpInput
- Page
Activity - Page
File - Page
Header - Page
Issue - Page
Milestone - Page
Person - Page
Update - Pagination
- Arc
Pagination— stepper + 5-page window with a gliding current-page mark. - Password
Field - Arc
PasswordField— masked password input with animatedEyeMorphreveal slash. - Password
Strength - Arc
PasswordStrength— a new-password field with an on-device strength meter. - Phone
Input - Arc
PhoneInput— phone field with a morphing country picker, live formatting with a faint shape guide, and E.164 output. - Progress
- Arc
Progress— slim determinate progress bar with spring fill, counted label and completion check. - Radio
Cards - Arc
RadioCards— grid or list option cards with a travelling selection ring. - Radio
Group - Arc
RadioGroupwith travelling FLIP selection highlight and spring-in indicator dot. - Range
Histogram Slider - Arc
RangeHistogramSlider— a two-thumb range over the histogram of the data it filters. - Rating
- Arc
Rating— star rating with a sweeping fill, a pop wave on commit, and scrub preview. - Reactions
- Reaction bar with rolling counts, additive icon kick, and floating reaction picker (
reactions). - Render
Counts - 渲染统计(窗口测试与 story 状态栏用)。
- Reorderable
List - Drag-and-drop & keyboard reorderable vertical list (
reorderable-list). - Resizable
Panels - Arc
ResizablePanels— horizontal split pane group with 1:1 divider drag,44pxrubber-band resistance past limits, collapsible panes with restore tabs, double-click reset, and keyboard resizing. - Rich
Text Editor - Arc
RichTextEditor— structured Markdown & HTML rich text editor with a morphing two-face toolbar (Format/Link),/slash block menu, 300-step undo/redo history, and live block rendering. - Ridgeline
- Arc
Ridgelinecomponent. - Ruler
Slider - Arc
RulerSlider— a tape-measure value input with a sliding tick ruler under a needle. - Scroll
Area - Arc
ScrollArea— custom scroll container with proportional edge fades, auto-lingering thin overlay scrollbars that thicken on hover/drag, and wheel-to-horizontal translation. - Scrub
Input - Arc
ScrubInput— compact inspector scrub field with arithmetic expression parsing, cycleable units, progress fill track,Shift/Altspeed modifiers, and12pxrubber-band limit strain. - Search
Field - Arc
SearchField— search input with adaptive magnifier contrast and animated clear slot. - Segmented
Control - Arc
SegmentedControl— mutually exclusive mode switcher with a gliding FLIP highlight pill. - Select
- Arc
Select— single-value dropdown selector with directional value-roll transition,spring.snappyrotating chevron, and a trigger-width floating listbox. - Shortcut
Recorder - Arc
ShortcutRecorder— a field that records a keyboard shortcut. - Signature
Pad - Arc
SignaturePad— a signature pad with undo/redo, ink colors and widths, live painting, and replay. - Skeleton
- Arc
Skeleton— loading placeholder (optional avatar + 1–6 text lines) with crossfade to content. - Slider
- Arc
Slider— a value or range on one track with 1:1 drag, rubber limits, velocity settle, an odometer bubble, keyboard stepping, and clickable marks. - Slope
Chart - Interactive two-column
SlopeChart. - Slot
Text - Arc
SlotText— text and numbers that spin into their new value like slot reels. - Sortable
Data Table - Sortable flat data table with column highlight tint, multi-select & Shift range selection (
sortable-data-table). - Sparkline
- Split
Button - Arc
SplitButtonjoining one primary action with a dropdown menu of sibling actions. - Stepper
- Steps indicator component (
stepper). - Streamgraph
- Arc
Streamgraphcomponent. - Swipe
Actions - Mail-inbox style list with horizontal swipe-to-reveal and full-swipe actions (
swipe-actions). - Switch
- Arc
Switchcomponent with spring-gliding thumb, held-press stretch, and controlled/uncontrolled API. - Tabs
- Arc
Tabscomponent with scoped FLIP shared-layout highlight pill, directional panel transitions, height morphing, and overflow scroll controls with edge-fade masks. - TagInput
- Arc
TagInput— freeform tag pill field with spring height wrapping, gliding selection ring, two-step Backspace/Arrow removal, and duplicate-tag pulse feedback. - Text
Morph - Arc
TextMorph— one short label morphs into the next in place. - Text
Reveal - Arc
TextReveal— a headline whose words rise out of their clips as it mounts. - Text
Shimmer - Arc
TextShimmer— a calm light sweep across a short status line. - Textarea
- Arc
Textarea— multi-line text field with Arc focus borders and spring-animated field messages. - Theme
Switch - Arc
ThemeSwitchbutton with sun/moon vector morph and 4 transition variants. - Time
Picker - Arc
TimePicker— a time dropdown over a fixed minute-step tick list. - Timeline
- Vertical day-grouped activity timeline with expandable details (
timeline). - Toast
- Arc standalone
Toast: single status notification card with a drawn checkmark badge, smooth height-morphing text frame, auto-dismiss timer, and bidirectional swipe-to-throw dismissal. - Toast
Stack - Arc
ToastStackviewport rendering stacked, expandable, swipe-to-dismiss toasts. - Toggle
Group - Arc
ToggleGroup— single-choice gliding pill or multi-select connected fills. - Tree
Table - Nested hierarchical data table with sibling sort & tri-state checkboxes (
tree-table). - Tree
View - Hierarchical file/outline tree with spring gliding selection & staggered expand (
tree-view). - Treemap
- Interactive hierarchical squarified
Treemap. - Upload
Request - 可从后台任务检查取消;回报必须在 GPUI 主线程 update 中调用。
- Usage
Meter - Multi-segment allowance usage meter (
usage-meter). - User
Menu - Arc
UserMenu— top-bar avatar trigger with morphing presence dot, identity header, account items, inline status/theme segmented switches, and sign-out progress state. - Waffle
Chart - Interactive unit grid
WaffleChart.
Enums§
- Changelog
Kind - Changelog
Media - 条目附件:本地或远程图片,或一段只读代码。
- Comparison
Value - Empty
Scene - Lod
- LOD 层级。
- Notification
Tone - OtpInput
Mode - Page
Section
Traits§
Functions§
- init_
arc - One-shot Arc-rs initialization helper to run inside
gpui_kit::application().run(|cx| ...). - install_
overlay_ layer - Re-export all UI components & charts at the crate root for ergonomic imports
(
use arc_gpui::{Button, Toast, LineChart, ...};). Registers the Arc overlay layer on every window opened afterwards.