hacer más pequeño un btn-group con css in javascript

You can use the transform CSS property along with the scale function to make the button group smaller. Here's an example:

<div class="btn-group">
  <button class="btn">Button 1</button>
  <button class="btn">Button 2</button>
  <button class="btn">Button 3</button>
</div>
151 chars
6 lines
index.tsx
const btnGroup = document.querySelector('.btn-group');
btnGroup.style.transform = 'scale(0.5)';
96 chars
3 lines

This will make the button group half its original size. You can adjust the scale value to make it bigger or smaller as needed.

Note: This code will make all the child elements of .btn-group smaller, so if you want to target a specific button, you'll need to give it a class or ID and target it specifically in your CSS or JavaScript.

related categories

gistlibby LogSnag