There are so many LED calculators on the web it is hardly needed - but we have V/I = R, which would be 2/0.3 = 66 ohms with a 5v supply and 3v LED. Which is an unusual resistance. I have some 120 ohm resistors.It is OK to use a 5V supply, but you will need a resistor for each LED. Hopefully, you know how to do the calculation.
Bob
The PWM dimmer should not drive the mains input to the 5V supply if that is what you mean.
There are a lot of PWM LED dimmer circuits on line.
Here is the first I found..
https://www.gadgetronicx.com/pwm-led-dimmer-circuit-ic555/
This is running on 9V, but the same sort of thing applies to the 5V one.
You could use an Arduino to drive it too. Have you played with them?
Oh, I just noticed the time.
I'm off to bed.
What is 0.3? You said the LEDs are 30mA which is 0.03A. Then the resistor is 2V/0.03A= 66 ohms. Use the standard value of 68 ohms, but I think 30mA is too high.V/I = R, which would be 2/0.3 = 66 ohms with a 5v supply and 3v LED.
Each LED might have a slightly different forward voltage then the lowest voltage LED will use more current than the remaining LEDs and be brighter and burn out sooner. I never operate an LED at its Absolute Maximum Allowed Current, I always calculate ordinary LEDs to use 10mA or 20mA. I put in parallel twenty Name Brand LEDs that I bought at the same time and they work fine. I have a cheap flashlight that has 24 ordinary LEDs all in parallel and they are fine but they operate at 10mA each.I note that someone said earlier that the same LEDs might not all take the same current if they are connected in parallel. Does that mean that I cannot connect two LEDs to one resistor, as in the schematic below? I just put resistor values in for illustration - for 5v they would obviously be different. Now I come to think of it, perhaps I have got that wrong and the resistor ought to be HALF the original value rather than TWICE, to allow double the current through?