Skip to content

Streamsync Gallery Component #144

Discussion options

You must be logged in to vote

Currently, there isn't any dedicated component to do a gallery. You can make something using the repeater and the image component.


component tree

import streamsync as ss

# This is a placeholder to get you started or refresh your memory.
# Delete it or adapt it as necessary.
# Documentation is available at https://streamsync.cloud

def click_img(state, context):
    state["image"] = context['item']

# Initialise the state

# "_my_private_element" won't be serialised or sent to the frontend,
# because it starts with an underscore

initial_state = ss.init_state({
    "my_app": {
        "title": "My App"
    },
    "images": {
        "1": {
            "caption": "curiosity",
            "…

Replies: 3 comments 2 replies

Comment options

You must be logged in to vote
0 replies
Answer selected by polishdataengineer
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
2 replies
@FabienArcellier
Comment options

@polishdataengineer
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants