Interactive matrix

Hey there,
Imagine I have a 2D np array and I want to display it as a table, or as a grid of buttons.
each cell in the grid (matrix) refferes to different image list that I’d like to present at the bottom of the table. I’d like the user to visualize the relevant images, by clicking each cell.

Steps to reproduce

option a:
I was thinking of an editable streamlit dataframe that shows the np array (numbers) and contain a checkbox. if one of the cell is checked the linked images be presented below.
option b:
build a grid of buttons (as the matrix size), if on_click=True for a specific button than relevan images be presented.

Love to hear about any others suggestions

hi ! its kinda confusing what your aim for it will be awesome if you can share more details about your project like source code or project link deployment or code.
as per your description its possible if you covert all you matrix data into formatted dataframe with pandas and use streamlit to visualize it. if yes !
looking forward for reply !