Search⌘ K

Accordion in Gradio

Explore how to use Gradio's Accordion element to create toggleable sections that hide or display content. This lesson teaches you to build cleaner, interactive UIs by adding collapsible areas that improve user experience.

Accordion

Accordion is a layout element in Gradio that can be used to create a toggle to show/hide content. This is a straightforward operation and can be used for things such as showing helpful information if the user needs it. Using Accordion can help to create a cleaner UI. It can be instantiated as follows:

with gr.Accordion():

The main parameters for Accordion are the ...