To do this i recommend using a power distribution center like the wfco wf.
How to wire led lights to a wall switch.
Here you can see there is a cut in the line wire connected to lamp 3 so the bulb is switch off and the rest circuit is working.
Wrap a piece of black electrical tape around each end of this white wire to indicate that it is a hot wire rather than a neutral wire.
Another major defect of series lighting circuit is that as all lamps or bulbs are connected between line l and neutral n accordingly if one of the light bulb gets faulty the rest of the circuit will not work as the circuit will be open as shown in fig below.
This lets you dim from one location and turn the lights on and off from another.
You will need a three way dimmer and a three way switch.
Although it is indeed possible to wire the lights directly to the positive and negative battery terminals installing a complete electrical system into a diy camper is going to involve moving the branch circuits lights fans usb outlets etc away from the battery bank.
Connect the black wire from the switch to the black.
How to wire 12v camper lights to a battery.
If only one switch controls the light purchase a single pole dimmer.
Run your cable from the first light to the second light.
Consequently the switch terminals are identical to those of a regular switch two brass ones for the hot connections and a green ground screw.
With a standard single pole dimmer a single switch controls the light.