Resistive braking (unless you do it more complicatedly) with a brushed motor only has one level of braking force.
What you basically do is disconnect the controller (or turn it off) from the motor (so the controller isn't shorted out by the braking resistor) then connect the braking resistor across the motor wires. There are various ways of doing this, from very simple to pretty complicated, each of which has advantages / disadvantages vs the others; depends on your needs, budget, skills, time, etc for which way to choose.
The simplest way is to have the braking switch disconnect the throttle input from the controller so the controller is "forced" to stop driving the motor, and at the "same" time have it connect the resistor across the motor wires. A big heavy duty switch could do this ok, like a circuit breaker; a smaller switch might work but may fail (welded closed or burned contacts) at some point.
To do it "right", you'll need a DPDT (2p2t, double pole double throw) switch (or relay / contactor) capable of handling the entire current of either braking or motor power (whichever is greater) rated for more than the highest voltage the system would ever see (double the battery voltage should be safe, since the braking may generate much higher voltage than the battery charges to, for short spikes). (if it's not rated for enough voltage or current, it might weld the contacts closed and not switch correctly or at all, since it must switch under possibly full system load).
And a resistor capable of dissipating the total power the braking will create. The lower the resistance, the greater the braking force. The resistor can be as simple as a very long piece of insulated wire wrapped around the bike frame tubing (so the frame acts as a kind of heatsink). For best heat transfer, use magnet wire (like that in a motor or transformer). The wire must be able to handle the current that will happen during braking--this may be anything from a few amps to a few dozen or more, depending on motor speed, vehicle speed and mass, and how long you engage braking for, as well as the wire resistance itself.
Using a relay/contactor means you dont' have to run high current wire up to wherever your braking switch is, you just use that little switch to turn the relay on when you want to brake, and the relay goes wherever is convenient. Using a switch directly means a big bulky switch wherever your braking control is, and high current wire to and from it.
You wire the relay so that it disconnects the motor from the controller, and connects it to the resistor instead. The resistor is connected across the two motor wires by the relay.
The two common poles of the switch/relay/contactor connects to the motor wires. The Normally Open (NO) poles connect to the resistor. The Normally Closed (NC) connect to the controller's motor wire outputs).
You can create multiple levels of braking by using multiple resistors and multiple switches/relays/contactors, so that the first one just disconnects the controller from the motor, then the next one connects to the first highest resistance, then the next connects to a lower resistance (or two higher resistances in parallel which halves them), and for more levels you add more switches/relays/contactors to connect more resistors in parallel, etc.
Or you could use just one lowest-resistance resistor and an LED PSU (or other CC/CV PSU) that can use DC input (rather than just AC) with a variable current control adjustment and an enable/disable control input, that has a wide input range (minimum of as low as you can get, and maximum of whatever the worst-case voltage spike the motor might put out during braking), and as high a current output as you need to brake adequately. The resistor wires across the PSU output. The motor wires to the PSU supply input. The brake switch wires to the enable/disable control input. The brake variable control wires to the variable current control adjustment input. (or replaces the onboard potentiometer). Meanwell probably makes something that would work.
This is a rather bulky and possibly expensive way to do it, so if you can afford a regen-capable brushed controller (like some of the Curtis ones, IIRC, or 4QD), it'll be much less complicated, and possibly be variable regen by nature, depending on controller design.
If you can find one you could also use a very large wirewound potentiometer (it will probably be as big as the motor) to get variable braking, and control it with a cable-operating throttle control grip, using the cable to rotate a pulley mounted on the wirewound pot. But this will be heavy and bulky. Somewhere around here I have (or used to) a Luxtrol stage lighting dimmer unit that could handle a thousand watts, and it would probably be able to do this job, but it is as large as a common DD hubmotor, and weighs at least as much as one.
![Frown :( :(](data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7)