Skip to main content

Dropdown component where clicking arrow on the side displays dropdown options

Project description

gradio_clickable_arrow_dropdown

Dropdown component where clicking arrow on the side displays dropdown options

Installation

pip install gradio_clickable_arrow_dropdown

Usage

import gradio as gr
from gradio_clickable_arrow_dropdown import ClickableArrowDropdown

def handle_inputs(reg_dropdown_val, custom_dropdown_val):
    res = f"""
    Regular dropdown value: {reg_dropdown_val}
    Custom dropdown value: {custom_dropdown_val}
    """

    return res

choices = ["Option 1", "Option 2", "Option 3"]

demo = gr.Interface(
    handle_inputs,
    [
        gr.Dropdown(choices=choices, value=choices[0], filterable=False), 
        ClickableArrowDropdown(choices=choices, value=choices[0], filterable=False)
    ],
    gr.Textbox(),
)

if __name__ == "__main__":
    demo.launch()

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

gradio_clickable_arrow_dropdown-0.0.3.tar.gz (70.6 kB view hashes)

Uploaded Source

Built Distribution

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page