1

i'm using box-control component to control the position (top, bottom, left, right) of an absolute positioned element. I have a problem: box-control doesn't allow negative values. How can i fix this or, eventually use another components to solve this issue?

2
2

It can be done through inputProps prop. Check below example:

<BoxControl
   label={ __('Margin', 'text-domain') }
   onChange={ (margins) => setAttributes({margins}) }
   inputProps={{ min: -300 }}
/>

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.