//-		DS2 core (c) 2024 Alexander McIlwraith 
//-		Core licensed under CC BY-SA 4.0 

extends ../../../core/_master-pattern
block content

	+h(0)
	p A tabs component that provides different sections of content that are displayed one at a time when the user selects that information. 

	+h(1)
	p The tabbed user interface enables users to jump to their target section quickly. Tabs present like logically group information on the same page. Information should  

	ul 
		li be logically chunked and ordered
		li be arallel in nature
		li show user's context
		li obvious where they begin and end 

	p Users should not need to see content of multiple tabs simultaneously and the user should be able to easily recognise where they are within the content.  


	+h(2)
	p The structure of the tab set is defined in html. There are two forms supported. Adding a class of #[code.inline .tab-group] to the container element will work in place of the #[code.inline tabset] tag, and the tab panels can be defined using either #[code.inline tab=""] or #[code.inline data-tab=""]. Passing an optional element to the init function will initialise tabs within that element. 


	tabset#tabs
		pre.language-html(tab="html")
			include _tabs.pug
		pre.language-pug(tab="pug")
			include _tabs.pp
		pre.language-css(tab="css")
			include tabs.css
		div(tab="scss")
			+h(3)
			pre.language-sass.
				@import "scss/core/tabs/_tabs";
				@include tabs{ 
					// optional content block
				};

			+h(4)
			pre.language-sass
				include _tabs.scss
		div(tab="js")
			+h(3)
			pre.language-js.
				import * as tabs from "./js/core/tabs/_tabs.js";
				tabs.init();
			+h(4)
			pre.language-js
				include _tabs.js

