Engineers have created a new format of solids made from silk protein that can be preprogrammed with biological, chemical, or optical functions, such as mechanical components that change color with strain, deliver drugs, or respond to light.