High-repetition-rate femtosecond lasers enable the precise production of nanofoam from a wide range of materials. Here, the laser-based fabrication of nanofoam from silicon, borosilicate glass, soda-lime glass, gallium lanthanum sulphide and lithium niobate is demonstrated, where the pore size of the nanofoam is shown to depend strongly on the material used, such that the pore width and nanofibre width appear to increase with density and thermal expansion coefficient of the material. In addition, the patterning of nanofoam on a glass slide, with fabricated pattern pixel resolution of ~35 µm, is demonstrated.