@gpuix/react@0.2.0
Also ships @gpuix/native@0.2.0. CI publishes both packages.
-
Selectable text everywhere, plus
<code>,<diff>and<markdown>— every string GPUIX paints can be selected with a drag and copied with Cmd+C. A drag can start in a plain<text>and end inside a code block.<div style={{ display: 'flex', flexDirection: 'column' }}> <text>drag from here</text> <code code={'and into this code block'} language="ts" /> </div>
Opt out with
userSelect: 'none'. Read the selection withrenderer.getSelectedText().<code code={source} language="typescript" showLineNumbers /> <diff patch={unifiedPatch} wordDiff collapsedPaths={['pnpm-lock.yaml']} /> <markdown source={readme} onLinkClick={(e) => open(e.value)} />
Bundled languages: Rust, TypeScript, TSX, JavaScript, JSX, Python, Go, JSON, Bash, TOML, YAML, Markdown, HTML, CSS, C.
-
Native
<input>and<textarea>— caret, mouse selection, IME, clipboard, undo/redo, and grapheme-safe deletion.Entersubmits.Shift+Enterinserts a newline in a textarea.<textarea value={draft} minRows={1} maxRows={8} onChange={(e) => setDraft(e.value ?? '')} onSubmit={send} />
-
render()remounts React on the same native window —bun --hotsaves remount the tree without a second window.import { render } from '@gpuix/react' render(<App />, { title: 'My App', width: 800, height: 600 })
-
Headless Select, Combobox, and Tooltip — unstyled primitives. Import
@gpuix/react/select,@gpuix/react/combobox, or@gpuix/react/tooltipand wrap them in localcomponents/uifiles.import * as SelectPrimitive from '@gpuix/react/select' <SelectPrimitive.Root value={model} onValueChange={setModel}> <SelectPrimitive.Trigger> <SelectPrimitive.Value placeholder="Select a model" /> </SelectPrimitive.Trigger> <SelectPrimitive.Content> <SelectPrimitive.Item value="sonnet">Sonnet</SelectPrimitive.Item> </SelectPrimitive.Content> </SelectPrimitive.Root>
-
<virtual-list>— GPUI builds only rows near the viewport.<virtual-list alignment="bottom" followTail estimatedItemHeight={180}> {messages.map((message) => <Message key={message.id} message={message} />)} </virtual-list>
-
Tintable local SVG icons
<svg src="/absolute/path/to/search.svg" style={{ width: 16, height: 16, color: '#b4b4b4' }} />
-
startFrameLoop()— idle CPU drops from ~73% to ~1%. Default pace is ~125fps.import { startFrameLoop } from '@gpuix/react' startFrameLoop(renderer)
-
Native GPUI platform on macOS, Windows, and Linux. Windows runtime validation is still pending.
-
GPUI upgrade to zed
d5dc01f2. Scroll events can reporttouchPhase: 'cancelled'. Building from source now needs Rust 1.97.1 and the Metal toolchain on macOS. -
Style props that were declared and dropped now work — full styles on
<text>, plusfontSize,textAlign,rowGap,columnGap,lineHeight, andborderWidth: 0. -
autoFocusworks and<input>no longer ships a hardcoded look. -
Blinking caret every 500ms while focused. Colour is
theme.caret. -
Clipboard and natural scroll — Cmd+C writes to the system clipboard. Wheel deltas keep the OS sign.
-
React 19 JSX components can return any
ReactNode.