Components

DropDown

<DropDown />

A Simple set of components allowing you to create dropdowns.

Usage

import {
  DropDown,
  DropDownTrigger,
  DropDownMenu,
  DropDownItem
} from '@admin-bro/design-system'

return (
  <DropDown>
    <DropDownTrigger>
      <Button>
        <Icon icon="OverflowMenuHorizontal" />
        This is trigger
      </Button>
    </DropDownTrigger>
    <DropDownMenu>
      <DropDownItem>
        <Link href="/some">
          <Icon icon="Video" />
          Some menu item
        </Link>
      </DropDownItem>
    </DropDownMenu>
  </DropDown>
)

It contains a couple of sub-components:

  • DropDown - an actual wrapper for an entire DropDown
  • DropDownTrigger - it has to be right inside the DropDown. It is what the user sees when the DropDown is not hovered
  • DropDownMenu - wraps elements which are hidden by default. Shown after hovering Trigger
  • DropDownItem - it is a wrapper for a menu item list. It can next contain either a Link or Button.

Props:

Example

See:

View Source admin-bro-design-system/src/molecules/drop-down/drop-down.tsx, line 18

Type Definitions

object

# DropDownItemProps

Props passed to DropDownItem Extends BoxProps

Properties:
Name Type Attributes Description
colorVariant VariantType <optional>

View Source admin-bro-design-system/src/molecules/drop-down/drop-down-item.tsx, line 91

object

# DropDownMenuProps

Props passed to DropDownMenu element. Extends BoxProps

Properties:
Name Type Attributes Description
isVisible boolean <optional>
stick DropDownStickProp <optional>

View Source admin-bro-design-system/src/molecules/drop-down/drop-down-menu.tsx, line 35

object

# DropDownProps

Props passed to DropDown element.

Properties:
Name Type Attributes Description
... string <optional>

Other props from BoxProps

stick DropDownStickProp <optional>

Indicates if menu should stick to left or right

View Source admin-bro-design-system/src/molecules/drop-down/drop-down.tsx, line 63

SoftwareBrothers

Proudly built and maintained by SoftwareBrothers

Software House with a passion for both JavaScript and TypeScript.

See what we do See what we believe in

Proudly built and maintained by

SoftwareBrothers