Skip to content

Make a specific zone scrollable #2377

Answered by mturoci
angus-clark asked this question in Q&A
Discussion options

You must be logged in to vote

Yes, bit needs a bit of CSS trickery atm.

from h2o_wave import main, app, Q, ui, on, run_on, data
from typing import Optional, List


def add_card(q, name, card) -> None:
    q.client.cards.add(name)
    q.page[name] = card


@on('#page1')
async def page1(q: Q):
    for i in range(3):
        add_card(q, f'info{i}', ui.tall_info_card(box='vertical', name='', title='Speed',
                                                  caption='The models are performant thanks to...', icon='SpeedHigh'))
    add_card(q, 'article', ui.tall_article_preview_card(
        box=ui.box('vertical', height='600px'), title='How does magic work',
        image='https://images.pexels.com/photos/624015/pexels-photo-…

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@angus-clark
Comment options

Answer selected by angus-clark
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