NOMAD is a spectrometer suite on board the ESA/Roscosmos ExoMars Trace GasOrbiter, which launched in March 2016. NOMAD consists of two infrared channels and one ultraviolet and visible channel, allowing the instrument to perform observations quasi-constantly, by taking nadir measurements at the day-and night-side, and during solar occultations. Here, in part 2 of a linked study, we describe the design, manufacturing, and testing of the ultraviolet and visible spectrometer channel called UVIS. We focus upon the optical design and working principle where two telescopes are coupled to a single grating spectrometer using a selector mechanism. Published by The Optical Society under the terms of the Creative Commons Attribution 4.0 License.