Go 10g if you are going to go small. Not many fish are going to work in a 5g.
The thing to understand is that small tanks can fluctuate rapidly and that does not go well for reefs. They need constant temp, salinity, pristine parameters, etc. The smaller you go, the more work it is IMO