Aside
Side-panel used for small user interactions, such as selecting a date.
The Aside
component must be created with a child component Panel
.
You can create the Aside
wherever you like, just make sure that it's positioned outside of the Main
element when it opens.
Adding a header
The data-ts.title
attribute configures the Aside with a nice header.
You can color the header by assigning any of the classnames
ts-bg-blue
,
ts-bg-green
,
ts-bg-red
and
ts-bg-purple
to the Aside
element itself.
Opening the aside
The data-ts.open
attribute can be flipped to toggle the Aside.
Let's try that with jQuery.
Adding some tabs
If an Aside
contains more than one Panel
,
we will automatically create a TabBar to switch between the panels like in this example.
The tabs can also be created programatically. In that case, the panel switching mechanism must be implemented manually somehow.
You can also mix the two approaches to dynamically update tabs that were created with Panel
elements. This will for example assign an onselect
callback to the third tab.
To remove all dynamically created tabs, you can simply clear the tab collection.
Adding some buttons
It's common for Asides to show a group of buttons, usually following a set of form fields. To make sure that they always look the same, the certified way to add this group of buttons is via a Buttons menu.
Showing the spinner
The data-ts.busy
attribute can be set to show the spinner
Let's try that with jQuery.
Tracking the state
You can setup inline callbacks to be invoked when the aside changes state using one of onopen
,
onopened
,
onclose
and
onclosed
.
You can also do this with event listeners if you like.
Stacking Asides
Asides will automatically stack themselves whenever new asides open.
- The old Asides will slide elegantly to the right
- The new Aside will float the top of the z-index