• 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

Dropdown

React dropdown component allows you to toggle contextual overlays for displaying lists, links, and more html elements.


Usage

Example

Header
Action DisabledAction
Another Action

Script


  return (
    <div>
      <CDropdown className="mt-2">
        <CDropdownToggle caret color="info">
          Dropdown button
        </CDropdownToggle>
        <CDropdownMenu>
          <CDropdownItem header>Header</CDropdownItem>
          <CDropdownItem disabled>Action Disabled</CDropdownItem>
          <CDropdownItem>Action</CDropdownItem>
          <CDropdownItem divider />
          <CDropdownItem>Another Action</CDropdownItem>
        </CDropdownMenu>
      </CDropdown>
    </div>
  )
  


# Features

  • Popper.js based toggleable menu
  • Toggling mechanism managed by default
  • Fully customizable toggler and menu

# Dropdown API

NameRequiredTypeDefault Value
tagany
main HTML tag name
childrenany
children components
classNamestring
user classes for the main HTML tag
innerRef(object | Function | string)
ref to the main tag
inNavboolean
set for dropdowns placed in Nav component



DropdownDivider


Render divider variant of CDropdownItem.



DropdownHeader


Render header variant of CDropdownItem.



DropdownItem


# DropdownItem API

NameRequiredTypeDefault Value
tagany
main HTML tag name
classNamestring
user classes for the main HTML tag
innerRef(object | Function | string)
ref to the main tag
colorstring
backgroud color
dividerboolean
render as divider
headerboolean
render as header
disabledboolean
disabled state
onClickFunction
on click event callback
activeboolean
active state



DropdownMenu


# DropdownMenu API

NameRequiredTypeDefault Value
childrentrueany
children components
classNamestring
user classes for the main HTML tag
innerRef(object | Function | string)
ref to the main tag
modifiersany[]
Popper Js modifiers
showboolean
show state
placement(top-end | top | top-start | bottom-end | bottom | bottom-start | right-start | right | right-end | left-start | left | left-end)bottom-start
the placement of dropdown menu



DropdownToggle


# DropdownToggle API

NameRequiredTypeDefault Value
tagany
main HTML tag name
childrenany
children components
classNamestring
user classes for the main HTML tag
innerRef(object | Function | string)
ref to the main tag
caretbooleantrue
render default caret
onClickFunction
on click event callback
splitboolean
split version
disabledboolean
disabled state

  • Components
    • Usage
      • Features
      • API
    • Related
      • CDropdown
      • CDropdownDivider
      • CDropdownHeader
      • CDropdownItem
      • CDropdownMenu
      • CDropdownToggle
CoreUI © 2020 creativeLabs.core-logo