Boards
The Board is simply a box that features buttons and tabs.
The Board
component must be created with a child component
Panel
.
This gives you a box with a dropshadow, but there are ways to make it more interesting.
The Board looks like this.
To start with, we can give the Board a title.
Buttons
Add buttons to the Board with the buttons
method. This works exactly
like it does in the
Header API, so
please refer to that section for details on setup and usage
Because these buttons are all tertiary, we will collect them inside a
menu. If you specifically don't want this behavior, you can disable it with the
uncompact
method.
Here"s a summary of the buttons
collection and button
model.
Tabs
The Board can also be setup with tabs to make a switchboard. There are two ways to
go about this depending on your prefered workflow. One is to declare the tabpanels
directly in the markup via multiple Panel
components.
Notice that they must be placed inside a containing
Panels
component for this to work. Also note that the individual
Panel
components must specify a label
. The tabs will be
rendered like this.
-
One
-
Two
-
Three
The other approach is to render the tabs programatically via the
tabs
method. This works exactly like it does in the
Header API, so
please refer to that section for details on setup and usage. Let's add some tabs
to the current collection.
Rembember that programatically generated tabs don't do anything by default. What
happens in the
onselect
callback is completely up to you.
Here"s a summary of the tabs
collection and tab
model.