A new, to our knowledge, type of optical device capable of beam redirection and frequency filtering is described. It is based on a transparent elastomeric binary diffraction grating. When light is passed through the device the intensities of the diffraction orders can be modulated by compression of the elastomer in the direction perpendicular to the plane of the grating. Selective filtering of the component frequencies of two-component light (lambda = 543.5 nm and lambda = 632.8 nm) has been demonstrated. Experimental observations are in agreement with theoretical calculations quantifying the performance of the device. (C) 1999 Optical Society of America.