{"cells": [{"cell_type": "markdown", "id": "302934307671667531413257853548643485645", "metadata": {}, "source": ["# Gradio Demo: button_component"]}, {"cell_type": "code", "execution_count": null, "id": "272996653310673477252411125948039410165", "metadata": {}, "outputs": [], "source": ["!pip install -q gradio "]}, {"cell_type": "code", "execution_count": null, "id": "288918539441861185822528903084949547379", "metadata": {}, "outputs": [], "source": ["import gradio as gr\n", "\n", "icon = \"https://cdn.icon-icons.com/icons2/2620/PNG/512/among_us_player_red_icon_156942.png\"\n", "with gr.Blocks() as demo:\n", " with gr.Row():\n", " gr.Button(variant=\"primary\")\n", " gr.Button(variant=\"secondary\")\n", " gr.Button(variant=\"stop\")\n", " with gr.Row():\n", " gr.Button(variant=\"primary\", size=\"sm\")\n", " gr.Button(variant=\"secondary\", size=\"sm\")\n", " gr.Button(variant=\"stop\", size=\"sm\")\n", " with gr.Row():\n", " gr.Button(variant=\"primary\", icon=icon)\n", " gr.Button(variant=\"secondary\", icon=icon)\n", " gr.Button(variant=\"stop\", icon=icon)\n", "\n", " with gr.Row():\n", " gr.Button(variant=\"primary\", size=\"sm\", icon=icon)\n", " gr.Button(variant=\"secondary\", size=\"sm\", icon=icon)\n", " gr.Button(variant=\"stop\", size=\"sm\", icon=icon)\n", "\n", " with gr.Row():\n", " gr.Button(variant=\"primary\", icon=icon, interactive=False)\n", " gr.Button(variant=\"secondary\", icon=icon, interactive=False)\n", " gr.Button(variant=\"stop\", icon=icon, interactive=False)\n", "\n", " with gr.Row():\n", " gr.Button(variant=\"primary\", size=\"sm\", icon=icon, interactive=False)\n", " gr.Button(variant=\"secondary\", size=\"sm\", icon=icon, interactive=False)\n", " gr.Button(variant=\"stop\", size=\"sm\", icon=icon, interactive=False)\n", "\n", " with gr.Row():\n", " gr.Button(variant=\"primary\", interactive=False)\n", " gr.Button(variant=\"secondary\", interactive=False)\n", " gr.Button(variant=\"stop\", interactive=False)\n", "\n", " with gr.Row():\n", " gr.Button(variant=\"primary\", size=\"sm\", interactive=False)\n", " gr.Button(variant=\"secondary\", size=\"sm\", interactive=False)\n", " gr.Button(variant=\"stop\", size=\"sm\", interactive=False)\n", "\n", " with gr.Group():\n", " gr.Button(variant=\"primary\")\n", " gr.Button(variant=\"primary\")\n", " gr.Button(variant=\"secondary\")\n", " gr.Button(variant=\"secondary\")\n", " gr.Button(variant=\"stop\")\n", " gr.Button(variant=\"stop\")\n", "\n", "\n", "demo.launch()\n"]}], "metadata": {}, "nbformat": 4, "nbformat_minor": 5}