When installing bathroom lighting of any kind, consult with the National Electrical Code, produced by the National Fire Protection Association, as well as with local building codes and regulations. In addition, keep in mind that the only certain way of remaining in compliance with code is to consult with or hire a professional to undertake any electrical projects, particularly for a hazardous location, such as a bathroom.
Damp and Wet Locations
According to the National Electrical Code, there are specific places within the bathroom where you cannot install lighting. For track lighting systems or lighting hung from chains, cables or cords, the prohibited installation area extends outwards from the shower and/or bathtub. Ceiling fans are likewise prohibited from this area. The black zone may be calculated by measuring 3 feet outward from the exterior edges of the bath or shower and 8 feet upward from the tub or stall's upper edge. The upper edge may be defined as the uppermost point to which water may rise without draining or overflowing. To install lighting directly above or beside a bathing area, you must use special fixtures, indicated for damp or wet locations. In addition, specially-marked lighting must be used in any locations considered "damp or wet;" consult with a professional about the specific requirements for your bathroom, taking into account the design of sinks or any other bathroom water elements.
Should you wish to use lighting that plugs into a wall receptacle, such as a small light-sensitive night light, follow the NEC's specific regulations for proper receptacles and outlets. In no cases may receptacles be placed within the shower and tub area or within the 3 by 8 foot space extending outwards. While you may purchase receptacles intended for "damp or wet locations," they are intended to serve outdoors, never within shower/bath areas.
When plugging lighting, such as night lights, into bathroom receptacles, ensure that the devices are grounded and that they use ground fault circuit interrupters. GFCIs function by interrupting the electrical flow whenever they detect that the circuit has been brought to "ground." In other words, if you accidentally interfere with the circuit, splashing water against exposed wiring, for example, the electricity would short out before the electricity could pass through the water and/or yourself. According to the NEC, all bathrooms must have GFCI interrupters. Install at least one 20-ampere electrical socket in any bathroom, and use it exclusively for lighting or other devices used within the bathroom. Conversely, do not plug bathroom lighting into an outlet located outside the bathroom. At least one electrical socket must be placed within 3 feet of the bathroom's washbasin or sink. If you install a lot of lighting in the bathroom, in combination with high-power heat lamps or other devices, you may require more than one circuit. Each circuit must have a GFCI interrupter.