Skip to content

Resizeable Sliding Panels #4038

Answered by ljilekor
ljilekor asked this question in Q&A
Nov 26, 2024 · 6 comments · 5 replies
Discussion options

You must be logged in to vote

this works (kinda) fine:

from nicegui import ui, context

@ui.page('/')
def page():
    context.client.content.classes('h-[100vh] gap-0 m-0 p-0')

    ui.add_head_html(f"""
    <script>
    function togglePanel(elementId, transitionDuration) {{
        const splitter = document.getElementById('c' + elementId);
        const beforePanel = splitter.querySelector('.q-splitter__before');
        const separator = splitter.querySelector('.q-splitter__separator');

        beforePanel.style.transition = 'margin-left ' + transitionDuration + 's, opacity ' + transitionDuration + 's';
        separator.style.transition = 'visibility ' + transitionDuration + 's';


        if (beforePanel.style.dis…

Replies: 6 comments 5 replies

Comment options

You must be logged in to vote
5 replies
@ljilekor
Comment options

@falkoschindler
Comment options

@ljilekor
Comment options

@falkoschindler
Comment options

@s71m
Comment options

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Answer selected by ljilekor
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants