A photopatternable elastomer [poly(butadiene-co-(4-vinylbenzyl thiocyanate)] bearing UV-sensitive thiocyanate (-SCN) groups, which isomerize to isothiocyanate (-NCS) units upon irradiation with UV light, is reported. This isomerization changes the refractive index of the elastomer, enabling the production of refractive index and relief distributed feedback (DFB) gratings using interference lithography. Blending a laser dye into the elastomer creates an optically pumped laser, which, when strained, allows continuous and reversible tuning of the laser emission wavelength.