Skip to main content

Crate arc_gpui

Crate arc_gpui 

Source
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 feature flow): GPU-accelerated node & workflow canvas.
  • flow_core (arc-flow-core, enabled by default via feature flow): 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, later popover, 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§

ActionButton
Arc ActionButton with Idle -> Pending -> Success -> Idle choreography, morphing label width, and hand-drawn pathLength checkmark.
ActionSwap
Arc ActionSwap — compact multi-state morphing pill button.
ActivityHeatmap
Interactive GitHub-style ActivityHeatmap.
Alert
Arc Alert — inline status message with tone icon, optional details and collapsing dismiss.
AnimatedCounter
Arc AnimatedCounter — odometer-style digits that roll toward the new value.
AnnouncementBar
Slim rotating announcement banner (announcement-bar).
ArcDialog
Arc Dialog — modal dialog with spring entrance, backdrop dim, SwapText header transitions, and mid-exit click-through.
ArcHoverCard
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.
AvatarGroup
Arc AvatarGroup — overlapping team avatar stack with hover nameplates and animated +N overflow.
Badge
Arc Badge — status pill / categorical tag with Oklab tint formula and spring width morphing.
BarChart
BillingToggle
Arc BillingToggle — billing period pill switch with a critically damped sliding thumb and tinting savings badge.
BottomSheet
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.
BrushChart
Arc BrushChart component.
Button
Arc Button component with adaptive press scale, width-morphing label slot, loading spinner presence, and full keyboard/accessibility behavior.
ButtonGroup
Arc ButtonGroup joining 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).
CardStack
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.
ChangelogEntry
ChangelogFeed
ChatThread
Arc ChatThread — grouped chat messages, reactions, read receipts, typing dots, and composer.
Checkbox
Arc Checkbox with 3-state check/indeterminate 3-vertex morph and spring fill.
ChipGroup
Arc ChipGroup — single or multi-select filter chips with spring check-slot growth, Oklab accent surface tinting, "+N more" overflow folding with pinned selections, and HeightFrame smooth row height morphing.
CodeBlock
Syntax-highlighted source code viewer with copy button & collapsible footer (code-block).
ColorPicker
Arc ColorPicker — swatch trigger expanding into a 2D saturation/brightness area, hue & opacity sliders, multi-format TextMorph readout, WCAG contrast meter, and saved swatches.
Combobox
Arc Combobox — searchable single-value dropdown with AutoHeight spring listbox, muted selected-label placeholder while typing, animated clear button, and settled label rise.
CommandItem
A command-palette entry. icon uses the GPUI Kit icon set as the native equivalent of Arc’s ReactNode icon slot.
CommandPalette
Arc CommandPalette: inline searchable command list with grouped, ranked results.
CommentThread
Arc CommentThread — nested replies, @mention highlighting, inline edit/delete, and resolve chip.
ComparisonColumn
ComparisonRow
ComparisonSection
ComparisonTable
ConfirmMorph
In-place morphing confirmation pill (confirm-morph).
ContextMenu
Arc ContextMenu — wraps a target surface and opens a pointer-anchored floating menu on right click, left click, or Shift+F10.
CookieConsent
Morphing cookie consent bar / preferences panel / floating reopen chip (cookie-consent).
CopyButton
Arc CopyButton with OS clipboard write, hand-drawn pathLength checkmark, and zero-overshoot label width morphing.
Countdown
Fixed-moment / duration countdown component (countdown).
DatePicker
Arc DatePicker — a trigger + popover wrapping the Arc Calendar.
DateRangePicker
Arc DateRangePicker — a trigger + panel picking a start and end together.
DefaultNodeRenderer
默认卡片:标题 + 状态点与状态文字。
DonutChart
Drawer
Arc Drawer — edge-anchored sliding sheet with header pan-to-dismiss, rubber-banding, late shadow fade, and SwapText header transitions.
DropdownMenu
Arc DropdownMenu — button trigger with spring label morph, rotating chevron, and a floating action menu with a gliding pointer / instant keyboard highlight pill.
ElasticSlider
Arc ElasticSlider component with elastic overscroll, detents, velocity-swaying value bubble, and full keyboard navigation.
EmptyState
Centered empty-state container with smooth in-place copy, icon, and height transitions (empty-state).
EmptyStates
ExpandableCard
Arc ExpandableCard — width + height morphing disclosure card with fixed-width inner layout, sequenced 60ms close hold / 120ms open fade-in, and rolling description swaps.
ExpandableText
Arc ExpandableText — multi-line clamp with soft bottom fade, distance-adaptive ease-out height glide, and a stable dual-label toggle button.
ExpandingButtonGroup
Arc ExpandingButtonGroup: compact pill toolbar where one item is always expanded to reveal its label, neighbors slide smoothly on motion.spring.morph, and actions with done_label confirm in place with a drawn checkmark.
ExpandingSearch
Arc ExpandingSearch — an icon button that morphs into a grouped search field.
FileDropzone
Arc FileDropzone — a drop target with a staged file list and upload simulation.
FileUpload
FileUploadItem
FilterToolbar
Active filter chips strip with two-step Field -> Value Add filter menu (filter-toolbar).
FloatingButtonGroup
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.
FlowCanvas
Gauge
Graph2D
2D 知识图谱画布。
HoldToConfirm
Arc HoldToConfirm — press-and-hold confirmation button with split-color advancing fill, spring rewind on early release, label width morph, and hand-drawn checkmark.
IconMorph
Arc IconMorph — decorative stateful vector icon that springs smoothly between two states. Wrap in a button that owns the accessible name and pressed state.
ImageCompare
Interactive before/after comparison frame with horizontal/vertical split (image-compare).
InViewTitle
Arc InViewTitle — a section title that reveals itself when it scrolls into view.
InlineEdit
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.
JsonViewer
Interactive collapsible JSON tree viewer with search, pagination & clipboard copy (json-viewer).
LineChart
MentionInput
Arc MentionInput — a field with @ people and # channel mentions.
MetricCard
KPI metric card pairing AnimatedCounter with directional text swap & trend badge (metric-card).
MoneyInput
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.
MorphSelect
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.
MultiSelect
Arc MultiSelect — multi-value selector with spring-expanding chip slots, directional +N overflow count roll, trailing clear button, and self-drawing option checkmarks.
NodeRenderCtx
渲染时传给节点的上下文。节点外框(位置、尺寸、ID、指针拦截)由画布提供, 渲染器只负责填满外框的内容。
NotificationActor
NotificationCenter
NotificationItem
NumberField
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.
OnboardingChecklist
Getting-started checklist card (onboarding-checklist).
OtpInput
PageActivity
PageFile
PageHeader
PageIssue
PageMilestone
PagePerson
PageUpdate
Pagination
Arc Pagination — stepper + 5-page window with a gliding current-page mark.
PasswordField
Arc PasswordField — masked password input with animated EyeMorph reveal slash.
PasswordStrength
Arc PasswordStrength — a new-password field with an on-device strength meter.
PhoneInput
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.
RadioCards
Arc RadioCards — grid or list option cards with a travelling selection ring.
RadioGroup
Arc RadioGroup with travelling FLIP selection highlight and spring-in indicator dot.
RangeHistogramSlider
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).
RenderCounts
渲染统计(窗口测试与 story 状态栏用)。
ReorderableList
Drag-and-drop & keyboard reorderable vertical list (reorderable-list).
ResizablePanels
Arc ResizablePanels — horizontal split pane group with 1:1 divider drag, 44px rubber-band resistance past limits, collapsible panes with restore tabs, double-click reset, and keyboard resizing.
RichTextEditor
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 Ridgeline component.
RulerSlider
Arc RulerSlider — a tape-measure value input with a sliding tick ruler under a needle.
ScrollArea
Arc ScrollArea — custom scroll container with proportional edge fades, auto-lingering thin overlay scrollbars that thicken on hover/drag, and wheel-to-horizontal translation.
ScrubInput
Arc ScrubInput — compact inspector scrub field with arithmetic expression parsing, cycleable units, progress fill track, Shift / Alt speed modifiers, and 12px rubber-band limit strain.
SearchField
Arc SearchField — search input with adaptive magnifier contrast and animated clear slot.
SegmentedControl
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.snappy rotating chevron, and a trigger-width floating listbox.
ShortcutRecorder
Arc ShortcutRecorder — a field that records a keyboard shortcut.
SignaturePad
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.
SlopeChart
Interactive two-column SlopeChart.
SlotText
Arc SlotText — text and numbers that spin into their new value like slot reels.
SortableDataTable
Sortable flat data table with column highlight tint, multi-select & Shift range selection (sortable-data-table).
Sparkline
SplitButton
Arc SplitButton joining one primary action with a dropdown menu of sibling actions.
Stepper
Steps indicator component (stepper).
Streamgraph
Arc Streamgraph component.
SwipeActions
Mail-inbox style list with horizontal swipe-to-reveal and full-swipe actions (swipe-actions).
Switch
Arc Switch component with spring-gliding thumb, held-press stretch, and controlled/uncontrolled API.
Tabs
Arc Tabs component 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.
TextMorph
Arc TextMorph — one short label morphs into the next in place.
TextReveal
Arc TextReveal — a headline whose words rise out of their clips as it mounts.
TextShimmer
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.
ThemeSwitch
Arc ThemeSwitch button with sun/moon vector morph and 4 transition variants.
TimePicker
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.
ToastStack
Arc ToastStack viewport rendering stacked, expandable, swipe-to-dismiss toasts.
ToggleGroup
Arc ToggleGroup — single-choice gliding pill or multi-select connected fills.
TreeTable
Nested hierarchical data table with sibling sort & tri-state checkboxes (tree-table).
TreeView
Hierarchical file/outline tree with spring gliding selection & staggered expand (tree-view).
Treemap
Interactive hierarchical squarified Treemap.
UploadRequest
可从后台任务检查取消;回报必须在 GPUI 主线程 update 中调用。
UsageMeter
Multi-segment allowance usage meter (usage-meter).
UserMenu
Arc UserMenu — top-bar avatar trigger with morphing presence dot, identity header, account items, inline status/theme segmented switches, and sign-out progress state.
WaffleChart
Interactive unit grid WaffleChart.

Enums§

ChangelogKind
ChangelogMedia
条目附件:本地或远程图片,或一段只读代码。
ComparisonValue
EmptyScene
Lod
LOD 层级。
NotificationTone
OtpInputMode
PageSection

Traits§

NodeRenderer

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.