Drag and select interaction

Is it possible to create a drag and select interaction in a prototype, as shown in the screen shot? The screen is from Figma itself, where clicking and dragging creates a transparent blue rectangle that moves with the cursor and select the items below it. I would like to create this same interaction in my prototype, and with the ability to tweak the colour of the rectangle. Grateful if anyone has suggestions to achieve this.