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?


1 Answer 1


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

   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 and acknowledge you have read our privacy policy.

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