Skip to main content
Gradio components are the building blocks for creating interactive machine learning applications. Each component serves a specific purpose, whether it’s collecting user input, displaying output, or controlling the app flow.

Component categories

Gradio provides several categories of components:

Input components

These components allow users to provide input to your functions:

Output components

These components display results from your functions:
  • Label - Classification labels with confidence
  • JSON - Pretty-printed JSON output
  • HTML - Custom HTML rendering
  • Gallery - Image/video grid display
  • Chatbot - Conversational interface
  • Plot - Interactive plots (Matplotlib, Plotly, Altair, Bokeh)
  • BarPlot - Native bar chart visualization
  • LinePlot - Native line chart visualization
  • ScatterPlot - Native scatter plot visualization
  • Model3D - 3D model viewer

Control components

These components control app behavior:

Special components

These components serve unique purposes:

Common parameters

Most components share these common parameters:
str | None
Label displayed above the component
bool | Literal['hidden']
default:"True"
Whether the component is visible
bool | None
Whether users can interact with the component
str | None
HTML DOM id for CSS styling
list[str] | str | None
HTML DOM classes for CSS styling

Usage patterns

You can use components as both inputs and outputs:
Or use them in Blocks for more control: