Invision UI v.19.6.0-0

Getting Started

  • Running Invision UI
  • UI Component Anatomy
  • Authoring SCSS
  • Authoring Presentational Behavior

Component Foundations

  • SCSS Authoring
    • Mixins & Variables
    • Stateful Classes
  • State Guidance
    • Empty/Zero State
    • Loading State
  • Utilities
    • Align
    • Display
    • Flexbox
    • Font Size
    • Layout
    • Offset
    • Position
    • Overflow
    • Size
    • Spacing
    • Text
  • Layout
    • Arrange [Deprectated]
    • Divided Columns
    • Embed Video
    • Full and Center
    • Fill [Deprectated]
    • Grid
    • Media Blocks
    • Panels
    • Vertical Layouts
  • Media Queries
  • Angular Behaviors
    • App Theme Directive
    • Auto Focus Input
    • Filters
    • Popup (modal dialog) Manager
    • Tether (tooltip/dropdown) Manager
    • Resize Sensor
    • Watchers

UI Component Library

  • Content & Containment
    • Active Translation
    • Auto Fit Text
    • Address
    • Basic & Input Table
    • Brand Logo/Slogan
    • Call to Action - Empty State
    • Carousel
    • Cart
    • Choice
    • Collapsible Container
    • Copyright Footer
    • Coupon Redeemer
    • Content
    • Date Relative Display
    • Definition Lists
    • Delimited List
    • Details
    • Expiration Date Display
    • Feature Toggle
    • Form Section Heading
    • Header
    • Heading
    • Heading With Annotation
    • Icons
    • Interaction Details
    • Labeled Balance
    • Link
    • Main Container
    • Metadata Card
    • Metadata List Item
    • Offering QuickView
    • Payment Instrument
    • Preference Dialog
    • Pricing Plan Decoration
    • Product Availability
    • Product Details
    • Product Image
    • Quick Info Panel
    • Remark
    • Renewal Column
    • Richlist Filterbar
    • Richlist Wrapper
    • Scrollable Horizontal List
    • Search Card
    • Search Panel
    • Section
    • Selectable Option
    • Smart Truncate
    • Status Grid
    • Tooltip
  • Data Visualizations
    • Bill Runs
    • Comparison Table
    • Datatable
    • Progress Tracker
    • Schedules
    • Query Builder
  • Dialogs
    • Confirmation Dialog
    • Dialog
    • Rich List Dialog
    • Wait Dialog
  • Forms and Filters
    • Additional Properties
    • Autocomplete
    • 3 Field Date Input
    • Checkbox
    • Credit Card
    • Bulk Action Bar
    • Buttons
    • Confirmation Button
    • Date Picker
    • E-Check
    • Entity Specification
    • External Bill
    • External Gift Card
    • Focus Group
    • Forms
    • Filter Bar
    • Filter Dropdowns
    • Gift Card
    • Grouped Check Filters
    • Inputs
    • Input Select Combo
    • Monetary Input
    • Multi Dropdown Selector
    • Multiple Numeric Input
    • Monetary Range Input
    • Password Unmask Button
    • Select
    • Select Button Or Stepper
    • Select Or Text Input
    • Stepper
    • Tag Dropdown
  • Navigation & Flow
    • Back Banner
    • Back Component
    • Breadcrumbs
    • Details Pager
    • Expandable Section
    • Infinite Scroll
    • Open New Window
    • Pager
    • Fancy Richlist
    • Standard Navigator
    • Status Indicator
    • Step Progress Bar
    • Step Progress Indicator
    • Tab Card
    • Tab Panel
    • Tier Navigator
    • Wizard
  • Notifications
    • Loading Indicator
    • Toast Notifications
  • Deprecated
    • Content Area

Showcase

  • General
    • Simplelist
    • Richlist
    • Primary (side) Navigator
  • Customer Care
    • Case Activity List
    • Customer Care Navigator Component
    • Dashboard
    • Decisions
  • Reporting
    • Content Visualization

Unit Testing

  • Actions
  • Components
  • Selectors
  • Reducers

End-to-end Testing

Statistics

Tab Panel

In this section

Overview Variants
  • Tab Panel
  • Tab without fixed width
  • Large Panel
  • More Tabs Panel Example
  • Centered Tabs
  • Top Highlight
  • Hide Single Tab
  • Responsive Panel

The Tab Panel component is presentational and only renders markup related to the tabs themselves (that is, tab panel content areas are managed and rendered separately). Being a presentational component, tabs hold no state and therefore rely on parent controllers to provide statefulness.

js
TabPanelBindings = {
    tabs: '<',
    onChanges: '&?',
    onTabSelected: '&',
    bottomHighlight: '<',
    topHighlight: '<',
    centerTabs: '<?',
    isOpen: '<?',
    hideSingleTab: '<?'
};

Several of the bindings related only to style: bottomHighlight (default), topHighlight, centerTabs, isOpen (only for responsive panel), and hideSingleTab (Tab Cards). onChanges and onTabSelected provide callback actions to the parent controller. tabs is the array of tabs to be displayed:

js
[{
    name : 'Summary',
    active : true,
    notificationCount: 2
},
{
    name : 'Comments',
    active : false,
    notificationCount: 4
},
{
    name : 'Emphasized',
    active : false,
    hasEmphasis: true,
    notificationCount: 4
},
{
    name: 'Has Error',
    hasError: true
}];

name and notificationCount will be rendered as part of the tab. active indicates state. hasEmphasis changes the color of the notification count badge. hasError shows a small error icon to indicate the tab content may be invalid.

No default styles are provided for the tab content area. This depends on context and should be informed by placement and size (cards vs. side panels, etc.).

Tab Panel

The tab panel displays a collection of tabs for selection.

Summary Contents
Comments Contents
HTML
<div class="t-content" style="width:450px; height: 100px;" ng-controller="tabPanelExampleController">
    <inv-tab-panel tabs="tabs" on-tab-selected="tabSelected"></inv-tab-panel>
    <div ng-show="tabs[0].active" style="text-align:center">Summary Contents</div>
    <div ng-show="tabs[1].active" style="text-align:center">Comments Contents</div>
</div>

Tab without fixed width

By default tabs have a fixed width. To accomodate tab with long title, this restriction can be removed with "tabWidthAuto" property set to true.

HTML
<div class="t-content" style="width:450px; height: 100px;" ng-controller="tabPanelExampleController">
    <inv-tab-panel tabs="tabsAutoWidth" on-tab-selected="tabSelected" tab-width-auto="true"></inv-tab-panel>
</div>

Large Panel

The tab panel will fill the width, while the tabs will stay aligned.

Summary Contents
Comments Contents
HTML
<div class="t-content" style="width:1000px; height: 100px;" ng-controller="tabPanelExampleController">
    <inv-tab-panel tabs="tabs" on-tab-selected="tabSelected"></inv-tab-panel>
    <div ng-show="tabs[0].active" style="text-align:center">Summary Contents</div>
    <div ng-show="tabs[1].active" style="text-align:center">Comments Contents</div>
</div>

More Tabs Panel Example

The tab panel displays a collection of tabs for selection.

HTML
<div class="t-content" style="width:1000px; height: 100px;" ng-controller="tabPanelExampleController">
    <inv-tab-panel tabs="moreTabs" on-tab-selected="tabSelected2"></inv-tab-panel>
</div>

Centered Tabs

Centering the tabs in the display.

Summary Contents
Comments Contents
HTML
<div class="t-content" style="width:1000px; height: 100px;" ng-controller="tabPanelExampleController">
    <inv-tab-panel tabs="tabs" on-tab-selected="tabSelected" center-tabs="true"></inv-tab-panel>
    <div ng-show="tabs[0].active" style="text-align:center">Summary Contents</div>
    <div ng-show="tabs[1].active" style="text-align:center">Comments Contents</div>
</div>

Top Highlight

Highlighting of active tab is displayed on the top of the tab instead of the bottom

Summary Contents
Comments Contents
HTML
<div class="t-content" style="width:450px; height: 100px;" ng-controller="tabPanelExampleController">
    <inv-tab-panel tabs="topHighlightTabs" on-tab-selected="tabSelectedTop" bottom-highlight="false"></inv-tab-panel>
    <div ng-show="tabs[0].active" style="text-align:center">Summary Contents</div>
    <div ng-show="tabs[1].active" style="text-align:center">Comments Contents</div>
</div>

Hide Single Tab

Optionally hide the tab panel if only one tab would be visible. The tab content area is unaffected. Only used with Tab Cards

Summary Contents
Comments Contents
HTML
<div class="t-content" style="width:450px; height: 100px;" ng-controller="tabPanelExampleController">
    <div ng-show="tabs[0].active" style="text-align:center">Summary Contents</div>
    <div ng-show="tabs[1].active" style="text-align:center">Comments Contents</div>
    <inv-tab-panel tabs="singleTab" on-tab-selected="tabSelected" hide-single-tab="true"></inv-tab-panel>
</div>

Responsive Panel

Context-specific tab panel that will shift layout at small screen sizes and optionally overlay other content

See the Dashboard Showcase for and example and implementation details.
HTML
<div>
    See the <a href="/styleguide/showcase/dashboard/index.html">Dashboard Showcase</a> for and example and implementation details.
</div>