Spatially confined self-assembly of peptide amphiphile nanofibers inside liposomes is triggered by light.