Description Usage Arguments See Also Examples
View source: R/shiny-material-side-nav-tabs.R
Use this function to create side-nav tabs in your application.
1 2 3 4 5 6 | material_side_nav_tabs(
side_nav_tabs,
icons = NULL,
color = NULL,
font_color = NULL
)
|
side_nav_tabs |
Named vector. The side-nav tab display names and corresponding side-nav tab ids. |
icons |
String vector. The names of the icons. Leave blank for no icons, or use "none". The length of the vector must match the length of side_nav_tabs. Visit https://materializecss.com/icons.html for a list of available icons. |
color |
String. The accent color of the side-nav tab wave animation. Leave blank for the default color. Visit https://materializecss.com/waves.html for a list of available colors. Side-nav tab color requires using word forms of colors (e.g. "purple"). |
font_color |
String. The side-nav tabs font color. Leave blank for the default color. Visit https://materializecss.com/color.html for a list of available colors. Side-nav tab color requires using word forms of colors (e.g. "deep-purple"). Also, lighten or darken effects do not work on side-nav tab colors. |
1 2 3 4 5 6 7 8 | material_side_nav_tabs(
side_nav_tabs = c(
"Example Side-Nav Tab 1" = "example_side_nav_tab_1",
"Example Side-Nav Tab 2" = "example_side_nav_tab_2"
),
icons = c("cloud", "none"),
color = "teal"
)
|
<div id="side_nav_tabs_click_info"></div>
<li class="shiny-material-side-nav-tab" id="example_side_nav_tab_1_tab_id">
<a class="waves-effect waves-teal" href="javascript:void(0)" onclick="$('.shiny-material-side-nav-tab-content').hide();$('.shiny-material-side-nav-tab-content').trigger('hide');$('.shiny-material-side-nav-tab-content').trigger('hidden');$('.shiny-material-side-nav-tab').removeClass('active');$('#example_side_nav_tab_1').show();$('#example_side_nav_tab_1').trigger('show');$('#example_side_nav_tab_1').trigger('shown');$('#example_side_nav_tab_1_tab_id').addClass('active');$('#side_nav_tabs_click_info').trigger('click');">
<i class="material-icons">cloud</i>
Example Side-Nav Tab 1
</a>
</li>
<li class="shiny-material-side-nav-tab" id="example_side_nav_tab_2_tab_id">
<a class="waves-effect waves-teal" href="javascript:void(0)" onclick="$('.shiny-material-side-nav-tab-content').hide();$('.shiny-material-side-nav-tab-content').trigger('hide');$('.shiny-material-side-nav-tab-content').trigger('hidden');$('.shiny-material-side-nav-tab').removeClass('active');$('#example_side_nav_tab_2').show();$('#example_side_nav_tab_2').trigger('show');$('#example_side_nav_tab_2').trigger('shown');$('#example_side_nav_tab_2_tab_id').addClass('active');$('#side_nav_tabs_click_info').trigger('click');">
<i class="material-icons">none</i>
Example Side-Nav Tab 2
</a>
</li>
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.