Mesostructured SBA-3 silica containing Reichardt's dye is shown to give a reversible optical response to gaseous ammonia, with a response time of a few seconds and an intensity proportional to the ammonia partial pressure, which are desirable properties for gas sensing.