class_docstr: Tab (or its alias TabItem) is a layout element. Components defined within the Tab will be visible when this tab is selected tab.
  Example:
      with gr.Blocks() as demo:
          with gr.Tab("Lion"):
              gr.Image("lion.jpg")
              gr.Button("New Lion")
          with gr.Tab("Tiger"):
              gr.Image("tiger.jpg")
              gr.Button("New Tiger")
  Guides: controlling-layout
class_docstr_tok: ["Tab","(","or","its","alias","TabItem",")","is","a","layout","element",".","Components","defined","within","the","Tab","will","be","visible","when","this","tab","is","selected","tab",".","Example",":","with","gr.Blocks","(",")","as","demo",":","with","gr.Tab","(","``","Lion","''",")",":","gr.Image","(","``","lion.jpg","''",")","gr.Button","(","``","New","Lion","''",")","with","gr.Tab","(","``","Tiger","''",")",":","gr.Image","(","``","tiger.jpg","''",")","gr.Button","(","``","New","Tiger","''",")","Guides",":","controlling-layout"]
docstr: Parameters:
      label: The visual label for the tab
      id: An optional identifier for the tab, required if you wish to control the selected tab from a predict function.
      elem_id: An optional string that is assigned as the id of the <div> containing the contents of the Tab layout. The same string followed by "-button" is attached to the Tab button. Can be used for targeting CSS styles.
      elem_classes: An optional string or list of strings that are assigned as the class of this component in the HTML DOM. Can be used for targeting CSS styles.
docstr_tok: ["Parameters",":","label",":","The","visual","label","for","the","tab","id",":","An","optional","identifier","for","the","tab",",","required","if","you","wish","to","control","the","selected","tab","from","a","predict","function",".","elem_id",":","An","optional","string","that","is","assigned","as","the","id","of","the","<","div",">","containing","the","contents","of","the","Tab","layout",".","The","same","string","followed","by","``","-button","''","is","attached","to","the","Tab","button",".","Can","be","used","for","targeting","CSS","styles",".","elem_classes",":","An","optional","string","or","list","of","strings","that","are","assigned","as","the","class","of","this","component","in","the","HTML","DOM",".","Can","be","used","for","targeting","CSS","styles","."]
code: def __init__(
      self,
      label: str | None = None,
      *,
      id: int | str | None = None,
      elem_id: str | None = None,
      elem_classes: list[str] | str | None = None,
      render: bool = True,
  ):
      """
      Parameters:
          label: The visual label for the tab
          id: An optional identifier for the tab, required if you wish to control the selected tab from a predict function.
          elem_id: An optional string that is assigned as the id of the <div> containing the contents of the Tab layout. The same string followed by "-button" is attached to the Tab button. Can be used for targeting CSS styles.
          elem_classes: An optional string or list of strings that are assigned as the class of this component in the HTML DOM. Can be used for targeting CSS styles.
      """
      BlockContext.__init__(
          self,
          elem_id=elem_id,
          elem_classes=elem_classes,
          render=render,
      )
      self.label = label
      self.id = id
  
file_path: gradio/gradio/layouts/tabs.py
imports: from __future__ import annotations
  from gradio_client.documentation import document, set_documentation_group
  from gradio.blocks import BlockContext
  from gradio.component_meta import ComponentMeta
  from gradio.events import Events
label_desc: Use image node_id 1 to create a new Tab object from inherited base classes: BlockContext with example: obj = Tab(label)