MCPcopy
hub / github.com/pmndrs/uikit

github.com/pmndrs/uikit @v1.0.74 sqlite

repository ↗ · DeepWiki ↗ · release v1.0.74 ↗
1,033 symbols 2,879 edges 332 files 6 documented · 1%
README

uikit

Build performant 3D user interfaces for threejs.

NPM NPM Twitter Discord

Perfect for games, XR (VR/AR), and any web-based Spatial Computing App.

What does it look like?

A simple UI with 2 containers horizontally aligned, rendered in fullscreen. When the user hovers over a container, the container's opacity changes. render of the above code

Source code when using @react-three/uikit:

import { createRoot } from 'react-dom/client'
import React from 'react'
import { Canvas } from '@react-three/fiber'
import { Fullscreen, Container } from '@react-three/uikit'

createRoot(document.getElementById('root')).render(
  <Canvas>
    <Fullscreen flexDirection="row" padding={10} gap={10}>
      <Container flexGrow={1} opacity={0.5} hover={{ opacity: 1 }} backgroundColor="red" />
      <Container flexGrow={1} opacity={0.5} hover={{ opacity: 1 }} backgroundColor="blue" />
    </Fullscreen>
  </Canvas>,
)

How to get started

If you are using @react-three/fiber, get started with building your first layout, take a look at our examples to see uikit in action. If you want to use vanilla three.js, visit this tutorial. Alternatively, learn more about:

Pre-styled component kits

We provide multiple kits containing themable pre-styled components.

default

based on Shadcn

horizon-kit

based on RLDS
Overview over all default components Overview over all horizon components
View All Components View All Components
install via @react-three/uikit-default or @pmndrs/uikit-default install via @react-three/uikit-horizon or @pmndrs/uikit-horizon

Migration guides

Sponsors

This project is supported by a few companies and individuals building cutting edge 3D Web & XR experiences. Check them out!

Sponsors Overview

Extension points exported contracts — how you extend this code

Object3D (Interface)
(no doc) [2 implementers]
packages/react/src/build.tsx
Object3D (Interface)
(no doc) [2 implementers]
packages/uikit/src/panel/interaction/pointer-events.ts
Window (Interface)
(no doc)
examples/performance/src/App.tsx
Window (Interface)
(no doc)
examples/vanilla/index.ts
Album (Interface)
(no doc)
examples/market/src/data/albums.ts
ThreeElements (Interface)
(no doc)
packages/react/src/index.tsx
Object3DEventMap (Interface)
(no doc)
packages/uikit/src/events.ts
TTFLoaderOptions (Interface)
(no doc)
packages/uikit/src/loaders/ttf.ts

Core symbols most depended-on inside this repo

withOpacity
called by 1514
packages/uikit/src/utils.ts
hsl
called by 304
packages/kits/default/core/src/theme.ts
peek
called by 159
packages/pub-sub/src/index.ts
defineSchema
called by 146
packages/uikit/src/properties/schema.ts
set
called by 79
packages/pub-sub/src/index.ts
abortableEffect
called by 78
packages/uikit/src/utils.ts
add
called by 70
packages/uikit/src/components/svg.ts
createInPropertiesSchema
called by 68
packages/uikit/src/properties/schema.ts

Shape

Function 415
Method 350
Class 260
Interface 8

Languages

TypeScript100%

Modules by API surface

packages/uikit/src/clipping.ts35 symbols
examples/vanilla/index.ts25 symbols
packages/uikit/src/scroll.ts21 symbols
packages/uikit/src/components/component.ts20 symbols
packages/kits/horizon/core/src/generate-theme-from-json.mjs20 symbols
packages/uikit/src/text/render/instanced-glyph-group.ts17 symbols
packages/uikit/src/flex/node.ts17 symbols
packages/uikit/src/utils.ts16 symbols
packages/uikit/src/text/render/instanced-glyph.ts16 symbols
packages/pub-sub/src/index.ts16 symbols
packages/kits/default/core/src/video/index.ts15 symbols
examples/performance/src/App.tsx15 symbols

Used by 1 indexed graphs manifest dependencies, hub-wide

Dependencies from manifests, versioned

@mdx-js/mdx3.1.0 · 1×
@pmndrs/handle6.6.29 · 1×
@pmndrs/msdfontsworkspace:^ · 1×
@pmndrs/pointer-events6.6.29 · 1×
@pmndrs/uikitworkspace:^ · 1×
@pmndrs/uikit-defaultworkspace:^ · 1×
@pmndrs/uikit-horizonworkspace:^ · 1×
@pmndrs/uikit-lucideworkspace:^ · 1×
@pmndrs/uikit-pub-subworkspace:^ · 1×
@preact/signals-core1.5.1 · 1×
@react-three/drei10.4.2 · 1×
@react-three/eslint-plugin0.1.1 · 1×

For agents

$ claude mcp add uikit \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact