Power xiao with 5v wall wort

I plan on using the xiao esp32 in a very small area powered by a 5v wall wort. I know I need a 5v diode between the power source and the xiao. I dont have much space, do I need a capacitor and if so, how small can I go and still be safe?

I’m curious why you need a diode and a cap? I power my modules with USB power, mac port, wall worts and battery packs all the time using just a USBA to USBC cable.

the power supply has a 2.5mm DC plug that connects to the outside of the box the microcontroller is in. There are other things that also need the 5V. The wiki says you can connect 5v to the 5v pin as long as you have a diode.

This diode should not be very useful, the wall power supply is actually stable enough

Did you mean the capacitor? The diode just limits the direction of current flow.

Sorry, I misunderstood you, I was talking about capacitors, the purpose of the capacitor here is probably filtering, which may not be very useful as you also have filtering capacitors in your power supply