Closed aniongithub closed 3 months ago
You can use .element
to get an element of a blade:
const pane = new Pane();
const b = pane.addBinding(PARAMS, 'foo');
b.element.id = 'someid';
https://tweakpane.github.io/docs/api/classes/_internal_.BindingApi.html#element
Thank you! I think this works as a workaround, but it would be nice to have a common property in the constructor that can do this uniformly. If not specified it can remain blank, of course.
If we add a new id
option, another question arises: Should we also add className
, style
, ... and other attributes?
I believe the attributes of the element should be accessed via the element
property. This approach is more robust.
Currently, there's no way to set the id of an element so it can be styled indpendent of all others that share its class. Providing a common way to set an id would make it possible to write CSS selectors that selectively style specific instances of an element.