Element Plus's el-tab-pane, for el_tabs(tabs =) and
update_el_tabs(): el_tabs("t", tabs = list(el_tab_pane("One", ...), el_tab_pane("Two", ...))).
Arguments
- label
Title of the tab.
- ...
The tab's content: tags, text, this package's components.
- name
The tab's value,
input$<id>while it is selected. Defaults tolabel.- disabled
Whether the tab is disabled.
- closable
Whether this tab can be closed, when the tabs' own
closableis off.- lazy
Render the content only when the tab is first selected. Its components do not exist, and report nothing, until then.
Binding
No argument follows v_bind(): a pane is drawn by el_tabs() from R.
Examples
el_tabs(
"t",
tabs = list(
el_tab_pane("User", "User settings"),
el_tab_pane("Config", el_switch("dark"), lazy = TRUE)
)
)
#> <div id="t" class="el-tabs el-tabs--top" data-el-tabs="true" data-shiny-island data-el-events="tab_remove tab_add" data-position="top" data-carded="false" data-closable="false">
#> <div class="el-tabs__header is-top">
#> <div class="el-tabs__nav-wrap is-top">
#> <div class="el-tabs__nav-scroll">
#> <div role="tablist" class="el-tabs__nav is-top">
#> <div class="el-tabs__active-bar is-top"></div>
#> <div id="t-tab-User" role="tab" aria-controls="t-pane-User" aria-selected="true" tabindex="0" class="el-tabs__item is-top is-active" data-el-name="User">User</div>
#> <div id="t-tab-Config" role="tab" aria-controls="t-pane-Config" tabindex="-1" class="el-tabs__item is-top" data-el-name="Config">Config</div>
#> </div>
#> </div>
#> </div>
#> </div>
#> <div class="el-tabs__content">
#> <div role="tabpanel" id="t-pane-User" aria-labelledby="t-tab-User" class="el-tab-pane" data-el-name="User">User settings</div>
#> <div role="tabpanel" id="t-pane-Config" aria-labelledby="t-tab-Config" aria-hidden="true" class="el-tab-pane" style="display:none" data-el-name="Config">
#> <template data-el-lazy="true">
#> <div id="dark" data-shiny-vue style="display: contents">
#> <script type="text/x-template" data-shiny-vue-template><div id="dark_container" style="display: contents">
#> <el-switch v-bind="$optional('switch')" v-model="value" :disabled="disabled" :active-text="activeText" :inactive-text="inactiveText" :style="{ '--el-switch-on-color': activeColor || undefined, '--el-switch-off-color': inactiveColor || undefined, '--el-switch-border-color': borderColor || undefined }" :active-value="activeValue" :inactive-value="inactiveValue" @change="handleChange"></el-switch>
#> </div></script>
#> <script type="application/json" data-shiny-vue-options>{"options":{"data":{"value":false,"disabled":false,"activeText":"","inactiveText":"","activeColor":"","inactiveColor":"","activeValue":true,"inactiveValue":false,"width":null,"name":null,"validateEvent":null,"activeActionIcon":null,"activeIcon":null,"ariaLabel":null,"beforeChange":null,"borderColor":null,"inactiveActionIcon":null,"inactiveIcon":null,"inlinePrompt":null,"loading":null,"size":null,"tabindex":null},"methods":{"handleChange":"function(value) { }"}},"input":"value","rate":null,"type":null,"use":["shinyElement.plugin"],"optional":{"switch":{"width":"width","name":"name","validate-event":"validateEvent","active-action-icon":"activeActionIcon","active-icon":"activeIcon","aria-label":"ariaLabel","before-change":"beforeChange","border-color":"borderColor","inactive-action-icon":"inactiveActionIcon","inactive-icon":"inactiveIcon","inline-prompt":"inlinePrompt","loading":"loading","size":"size","tabindex":"tabindex"}},"evals":["options.methods.handleChange"]}</script>
#> </div>
#> </template>
#> </div>
#> </div>
#> </div>