Generally they are considered vehicles (like motorcycles and pedal cycles), so are subject to the same rules of the road. Regulations may define maximum power output and for electric bikes may or may not require an interlock to prevent use of power when the rider is not pedaling. In some cases regulatory requirements have been complicated by lobbying in respect of the Segway HT.
However, Emu sells a little foldable number if that's your bag. The Emu Crossbar is for  town commuters that require a sweet ride that's backed up by solid Shimano Nexus hub gears and Tektro brakes, which are adequate if not the best on the market. Riding is smooth and easy, with the crank moving sensor doing its best to iron out any gaps in power delivery.
Legislative changes in 2012 significantly altered the classification and regulatory structure for e-bikes. The general effect was to establish electric-assisted bicycles as a subset of bicycles and regulate e-bikes in roughly the same manner as bicycles instead of other motorized devices with two (or three) wheels. Laws 2012, ch. 287, art. 3, §§ 15-17, 21, 23-26, 30, 32-33, and 41. The 2012 Legislature also modified and clarified regulation of e-bikes on bike paths and trails. Laws 2012, ch. 287, art. 4, §§ 1-4, 20.

Most electric bicycles can be classified as zero-emissions vehicles, as they emit no combustion byproducts. The environmental effects of electricity generation and power distribution and of manufacturing and disposing of (limited life) high storage density batteries must be taken into account. Even with these issues considered, electric bicycles will have significantly lower environmental impact than conventional automobiles, and are generally seen as environmentally desirable in an urban environment. The small size of the battery pack on an electric bicycle, relative to the larger pack used in an electric car, makes ebikes very good candidates for charging via solar power or other renewable energy resources. Sanyo capitalized on this benefit when it set up "solar parking lots," in which ebike riders can charge their vehicles while parked under photovoltaic panels.[16]
Historically, materials used in bicycles have followed a similar pattern as in aircraft, the goal being high strength and low weight. Since the late 1930s alloy steels have been used for frame and fork tubes in higher quality machines. By the 1980s aluminum welding techniques had improved to the point that aluminum tube could safely be used in place of steel. Since then aluminum alloy frames and other components have become popular due to their light weight, and most mid-range bikes are now principally aluminum alloy of some kind.[where?] More expensive bikes use carbon fibre due to its significantly lighter weight and profiling ability, allowing designers to make a bike both stiff and compliant by manipulating the lay-up. Virtually all professional racing bicycles now use carbon fibre frames, as they have the best strength to weight ratio. A typical modern carbon fiber frame can weighs less than 1 kilogram (2.2 lb).
Haibike ships the HardNine with 29-inch tires, 180-millimeter hydraulic disc brakes, a 100-millimeter front suspension fork, and a nine-speed Shimano shifting system. The bike’s LCD readout is affixed to the handlebars and displays the current speed, level of charge, remaining range, and current pedal assist mode. The company says the battery can be completely recharged in just four hours, minimizing downtime between rides.