A novel approach, called pigtailing, is presented for the construction of optical detectors for capillary electrophoresis. Optical components and procedures from other fields, mainly telecommunications, are incorporated into these devices to give miniaturized detection systems. Suitable light sources for the construction of pigtail absorbance, fluorescence, refractive index and thermo-optical detectors are light-emitting diodes (LEDs) and laser diodes. The best optical components are gradient-index lenses, optical fibers or diffractive optical elements. These components are joined to the capillary with refractive-index-matching materials to avoid refraction and reflections at the optical interfaces and to reduce mechanical vibrations. These joints also facilitate fast thermal equilibrium. The performance of absorption detectors depends mainly on the brightness of the selected LEDs. Two types of refractive-index capillary detectors are described: one features a single-mode polarization-preserving fiber whereas the second uses a customized holographic plate as the main optical element.