Description Usage Arguments Value Functions Examples
Create a tab box with additional UI elements.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 |
tabs |
Tabs to include within the box. |
title |
Label of the box. |
color |
Color of the box. One of |
ribbon |
Should label be presented as ribbon. |
title_side |
Side of a label. One of |
collapsible |
Should minimize button be added to label. |
width |
Width of the box. |
id |
ID of the box. |
... |
other elements of the box. |
A box that can be passed to dashboardBody
tabBox
: Create a tab box (alias for tab_box
for compatibility with shinydashboard
)
1 2 3 4 5 |
Attaching package: ‘semantic.dashboard’
The following object is masked from ‘package:graphics’:
box
<div class="five wide column">
<div class="ui segment raised blue">
<div id="box_342886687973579576557868529731" class="ui accordion">
<div class="title" style="cursor: auto">
<div class="ui top right ribbon label blue">
<i class="minus icon" style="cursor: pointer;"></i>
Sample tab box
</div>
</div>
<div class="content active">
<div>
<div id="menu-ocanwrqgdneilyhnhmxt" class="ui menu top attached tabular">
<a class="item active" data-tab="tab-fmdniiqlfctcwymdmxct">First Tab</a>
<a class="item " data-tab="tab-mvuofywggloqzozqlfmn">Second Tab</a>
</div>
<div class="ui tab bottom attached segment active" data-tab="tab-fmdniiqlfctcwymdmxct">This is first tab</div>
<div class="ui tab bottom attached segment " data-tab="tab-mvuofywggloqzozqlfmn">This is second tab</div>
<script> $(document).on('shiny:sessioninitialized', function(event) {
Shiny.onInputChange('menu-ocanwrqgdneilyhnhmxt_tab', 'tab-fmdniiqlfctcwymdmxct');
});
// Code below is needed to trigger visibility on reactive Shiny outputs.
// Thanks to that users do not have to set suspendWhenHidden to FALSE.
var previous_tab;
$('#menu-ocanwrqgdneilyhnhmxt.menu .item').tab({
onVisible: function(target) {
if (previous_tab) {
$(this).trigger('hidden');
}
$(window).resize();
$(this).trigger('shown');
previous_tab = this;
Shiny.onInputChange('menu-ocanwrqgdneilyhnhmxt_tab', $(this).attr('data-tab'))
}
});</script>
</div>
</div>
</div>
</div>
<script>$(document).ready(function() { $('#box_342886687973579576557868529731').accordion({
selector: { trigger: '.title .icon' },
onOpening: function() { $('#box_342886687973579576557868529731').find('.label .icon').removeClass('plus').addClass('minus'); },
onClosing: function() { $('#box_342886687973579576557868529731').find('.label .icon').removeClass('minus').addClass('plus'); }
}); })</script>
</div>
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.