Modulated aggregation and photonic properties of layered nanostructures (LNs) result in the stimuli-responsive output of colorimetric and fluorescence signals, contributing to the desired construction of novel chemical and biological sensors.