New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

leva

Package Overview
Dependencies
Maintainers
1
Versions
74
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

leva

<!-- ALL-CONTRIBUTORS-BADGE:START - Do not remove or modify this section --> [![All Contributors](https://img.shields.io/badge/all_contributors-9-orange.svg?style=flat-square)](#contributors-) <!-- ALL-CONTRIBUTORS-BADGE:END --> # leva 🌋

  • 0.1.0-beta.0
  • beta
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
85K
decreased by-14.15%
Maintainers
1
Weekly downloads
 
Created
Source

All Contributors

leva 🌋

yarn add leva

useControls brings is a smart GUI for your React apps and your creative coding endeavors:

  • 🧐 Smart defaults, your GUI will always pick the best input type for your data
  • 🤳 Mobile-ready, all inputs work perfectly on mobile
  • 💪 Type safety, useControls is built from the ground up with typescript, all types are inferred from your code.

useControls isn't a component library.

Features

  • As-you-type filtering of inputs.
  • You can modify number inputs by either dragging over the input label or inner label.
  • The lib automatically calculates the number input step based on the initial value magnitude and significant digits.
  • Increase / decrease numbers with arrow keys, with alt (±0.1) and shift (±10) modifiers support.
  • Draggable pane.
  • Supports copy paste.

Inputs

  • String
  • Boolean
  • Number
  • Range
  • Interval [min,max]
  • Point2d [x,y] or {x,y}
  • Point3d [x,y,z] or {x,y,z}
  • Color #hex and {r,g,b,a}
  • Select
  • Spring {tension,friction,mass}
  • Image

Usage

Simply call the useControls hook from anywhere in your app.

Your component will update whenever the values defined in the hook are changed!

import { useControls } from 'leva'

function MyComponent() {
  const { myValue } = useControls({ myValue: 10 })
  return myValue
}

Contributors ✨

Thanks goes to these wonderful people (emoji key):


Gianmarco

🤔 💻

David Bismut

🤔 💻

Han

🎨

Andrew Prifer

🤔

Aria

🤔

Marco Ludovico Perego

🤔

Marco Fugaro

🤔

Ivan Rossi

🐛

thephoenixofthevoid

🐛

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

FAQs

Package last updated on 25 Jan 2021

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc