In this example, the media query breakpoint is set 768px.
Resize window below 768px and controls will be an accordion.
Resize to 768px or above and they will appear as regular tabs.
<div class="tabs">
  <h2>[...]</h2>
  <div>[...]</div>
  <h2>[...]</h2>
  <div>[...]</div>
</div>
					
If you want a specific tab other than the first to be open by default then add the class 'responsive-tabs__panel--active' onto the panel, eg:
<div class="tabs">
  <h2>[...]</h2>
  <div>[...]</div>
  <h2>[...]</h2>
  <div class="responsive-tabs__panel--active">[...]</div>
</div>
					
responsiveTabs.js is available
Responsive-Tabs