Releases: pmndrs/leva
@leva-ui/[email protected]
@leva-ui/[email protected]
[email protected]
Patch Changes
-
50e8096: fix: sanitize step should behave better.
improvement: expand panel when filter changes. -
09a1a38: Allow specifying the explicit input type via the
type
option. This is handy when you want to prevent your string value being casted to a color or number.import { LevaInputs, useControls } from 'leva' useControls({ color: { type: LevaInputs.STRING, value: '#f00', }, number: { type: LevaInputs.STRING, value: '1', }, })
[email protected]
Patch Changes
- 7edbb69: chore: update dependencies.
[email protected]
Patch Changes
-
34281d7: Add new value option
transient
. This allows opting out of the transient mode when having aonChange
handler invoked.const data = useControls({ color: { value: '#7c3d3d', onChange: value => { console.log(value) }, transient: false, }, }) console.log(data) // { color: '#7c3d3d' }
const data = useControls({ color: { value: '#7c3d3d', onChange: value => { console.log(value) }, transient: true, }, }) console.log(data) // {}
This is handy if you want to use the
onChange
handler for triggering a save on a remote server, while still triggering a re-render with the value.
@leva-ui/[email protected]
[email protected]
Patch Changes
- 09ac7b1: chore: remove
clipboard-polyfill
dependency.
[email protected]
Patch Changes
-
50d850a: BREAKING CHANGE: Replace
hideTitleBar
withtitleBar
option.For hiding the title bar the usages of
<Leva hideTitleBar />
must be replaced with<Leva titleBar={false} />
.It is now possible to overwrite the six dots rendered as the title by default by providing a
title
option to thetitleBar
property.<Leva titleBar={{ title: 'Some Title', }} />
Its is now possible to disable dragging of the panel via the
drag
option to thetitleBar
property.<Leva titleBar={{ drag: false, }} />
It is now possible to enable or disable filtering of the panel values via the
filter
option on thetitleBar
property.<Leva titleBar={{ filter: true, }} />
[email protected]
Patch Changes
- e0fdefc: types: fix beautifier union type.
[email protected]
Patch Changes
- a7f9bf1: types: don't use union type when not using objects as plugin function args.