Self-sorting click reactions that generate spatially controlled chemical functionality on surfaces.