title: How to move the tab panels from above the control panel to the main panel
body: <p>I have a very long shiny syntax in which the tab panels are located right above the control panel. I was wondering to know how can I move the tabs to the main panel (as shown in the below image). I know that one solution could be to define the tab panels inside the main panel but for some reason, I would like to avoid this. Thanks.
  Nader</p>
  
  <p><strong>Actual problem</strong> </p>
  
  <p><a href="https://i.stack.imgur.com/In8zL.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/In8zL.png" alt="enter image description here"></a></p>
  
  <p><strong>sample code (the problem)</strong></p>
  
  <pre><code>library(shiny)
  
  ui &lt;- fluidPage(
  
    titlePanel("Tabsets"),
    tabsetPanel(
      tabPanel("Plot"), 
      tabPanel("Summary"), 
      tabPanel("Table")),
  
    sidebarLayout(
  
      sidebarPanel(
        sliderInput('sampleSize', 'Sample Size', 
                    min=1, max=nrow(dataset), value=min(1000, nrow(dataset)), 
                    step=500, round=0)
      ),
  
      mainPanel(
  
        )
      )
    )
  
  server &lt;- function(input, output) {
  }
  
  
  shinyApp(ui, server)
  </code></pre>
  
  <p><strong>sample code (possible solution)</strong></p>
  
  <pre><code>library(shiny)
  
  ui &lt;- fluidPage(
  
    titlePanel("Tabsets"),
  
  
  
    sidebarLayout(
  
      sidebarPanel(
        sliderInput('sampleSize', 'Sample Size', 
                    min=1, max=nrow(dataset), value=min(1000, nrow(dataset)), 
                    step=500, round=0)
      ),
  
      mainPanel(
  
        tabsetPanel(
          tabPanel("Plot"), 
          tabPanel("Summary"), 
          tabPanel("Table"))
  
        )
      )
    )
  
  
  
  
  server &lt;- function(input, output) {
  }
  
  
  shinyApp(ui, server)
  </code></pre>