MCPcopy Index your code
hub / github.com/pmndrs/leva

github.com/pmndrs/leva @0.10.1

repository ↗ · DeepWiki ↗ · release 0.10.1 ↗ · Ask this repo → · + Follow
348 symbols 958 edges 207 files 1 documented · 0% 2 cross-repo links updated 7mo agoleva@0.10.1 · 2025-10-31★ 5,985108 open issues
README

npm (tag) npm bundle size GitHub Workflow Status Discord Shield

A GUI you are going to lava.

Customizable, extensible and beautiful by default.

Storybook

by Poimandres

🚧🚧 This repo is under heavy development 🚧🚧

Features

  • ⭐️ Beautiful by default
  • 🎚 More than 12 different kinds of inputs available
  • 🧐 Smart input type recognition
  • 🔌 Easy-to-make plugins
  • ✅ Keyboard accessible
  • ⚡️ No setup necessary

Installation

npm i leva

Quick start

Simply call the useControls hook from anywhere in your app:

import { useControls } from 'leva'

function MyComponent() {
  const { name, aNumber } = useControls({ name: 'World', aNumber: 0 })

  return (



      Hey {name}, hello! {aNumber}



  )
}

NOTE: Using Leva with React 18 will cause a console error about createRoot which you can safely ignore, or fix by following the instructions here: discussion

Documentation

Contributors ✨

Thanks goes to these wonderful people (emoji key):

Andrew Prifer 🤔 💻 Aria 🤔 David Bismut 🤔 💻 Dmitry Ivakhnenko 💻 Gianmarco 🤔 💻 Guido Vizoso 💻 Han 🎨
Ivan Rossi 🐛 Laurin Quast 💻 🤔 Marco Fugaro 🤔 Marco Ludovico Perego 🤔 Piotr Monwid-Olechnowicz 📖 clementcassajus 🎨 thephoenixofthevoid 🐛

This project follows the all-contributors specification. Contributions of any kind welcome!

Extension points exported contracts — how you extend this code

Plugin (Interface)
(no doc)
packages/leva/src/types/public.ts
LineProps (Interface)
(no doc)
packages/plugin-bezier/src/BezierSvg.tsx
LevaInputProps (Interface)
(no doc)
packages/leva/src/types/public.ts
InternalPlugin (Interface)
(no doc)
packages/leva/src/types/internal.ts
Validation (Interface)
(no doc)
packages/leva/src/types/v8n.d.ts

Core symbols most depended-on inside this repo

useControls
called by 121
packages/leva/src/useControls.ts
folder
called by 32
packages/leva/src/helpers/folder.ts
useInputContext
called by 22
packages/leva/src/context.tsx
get
called by 17
packages/plugin-plot/src/plot-plugin.ts
Number
called by 15
packages/leva/src/components/Number/Number.tsx
useTh
called by 13
packages/leva/src/styles/index.ts
test
called by 12
packages/leva/src/types/v8n.d.ts
useCreateStore
called by 10
packages/leva/src/store.ts

Shape

Function 301
Method 37
Interface 5
Enum 3
Class 2

Languages

TypeScript100%

Modules by API surface

packages/leva/src/types/v8n.d.ts40 symbols
packages/leva/stories/input-options.stories.tsx16 symbols
packages/plugin-bezier/src/bezier-utils.ts12 symbols
packages/leva/stories/panel-options.stories.tsx9 symbols
packages/leva/src/utils/math.ts9 symbols
packages/leva/src/components/Vector/vector-plugin.ts9 symbols
packages/leva/src/plugin.ts8 symbols
packages/leva/stories/hook-dependencies.stories.tsx6 symbols
packages/leva/stories/controlled-inputs.stories.tsx6 symbols
packages/leva/src/components/Color/Color.tsx6 symbols
packages/leva/src/utils/object.ts5 symbols
packages/leva/src/components/Number/number-plugin.ts5 symbols

Used by 2 indexed graphs manifest dependencies, hub-wide

Dependencies from manifests, versioned

@babel/core7.20.12 · 1×
@babel/preset-env7.20.2 · 1×
@babel/preset-react7.18.6 · 1×
@babel/preset-typescript7.18.6 · 1×
@changesets/cli2.26.0 · 1×
@emotion/react11.10.5 · 1×
@leva-ui/plugin-bezierworkspace:* · 1×
@leva-ui/plugin-datesworkspace:* · 1×
@leva-ui/plugin-plotworkspace:* · 1×
@leva-ui/plugin-springworkspace:* · 1×
@preconstruct/cli2.3.0 · 1×

For agents

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

⬇ download graph artifact