• Getting Started
  • Components
  • Github
  • Go pro
energyGetting started
  • Introduction
dComponents
  • Button Components
  • Grid Components
  • Input Components
  • Layout Components
  • Toast Components
  • Widget Components
  • Alert
  • Badge
  • Breadcrumb
  • Callout
  • Card
  • Carousel
  • Charts
  • Collapse
  • CreateElement
  • DataTable
  • Dropdown
  • ElementCover
  • Embed
  • Fade
  • Form
  • Icon
  • Img
  • Jumbotron
  • Link
  • ListGroup
  • Media
  • Modal
  • Nav
  • Navbar
  • Pagination
  • Popover
  • Progress
  • Spinner
  • Switch
  • Tabs
  • Toggler
  • Tooltip

Tabs

Tabs components.


Usage

Example

  • Home
  • Profile
  • Messages
123
456
789

Script


  return (
    <CTabs activeTab="home">
      <CNav variant="tabs">
        <CNavItem>
          <CNavLink data-tab="home">
            Home
          </CNavLink>
        </CNavItem>
        <CNavItem>
          <CNavLink data-tab="profile">
            Profile
          </CNavLink>
        </CNavItem>
        <CNavItem>
          <CNavLink data-tab="messages">
            Messages
          </CNavLink>
        </CNavItem>
      </CNav>
      <CTabContent>
        <CTabPane data-tab="home">
          123
        </CTabPane>
        <CTabPane data-tab="profile">
          456
        </CTabPane>
        <CTabPane data-tab="messages">
          789
        </CTabPane>
      </CTabContent>
    </CTabs>
  )
  


Features

  • Simple to use
  • Customizable styling
  • Optional fading effect when switching the active tab

CTab... and CTabs components are tightly coupled which means you using them together is required, for component to work.

# Tabs API

NameRequiredTypeDefault Value
childrenany
children components
activeTab(string | number)0
active tab number
onActiveTabChangeFunction
on active tab change callback

Context

  • own context


TabContent


# TabContent API

NameRequiredTypeDefault Value
classNamestring
user classes for the main HTML tag
innerRef(object | Function | string)
ref to the main tag
fadebooleantrue



TabPane


# TabPane API

NameRequiredTypeDefault Value
classNamestring
user classes for the main HTML tag
innerRef(Function | string | object)
ref to the main tag
activeboolean
active state

  • Components
    • Usage
      • Features
      • API
    • Related
      • CTabs
      • CTabContent
      • CTabPane
CoreUI © 2020 creativeLabs.core-logo