DropdownMenu

Displays a compact menu anchored to a trigger. Use it to group related actions without occupying persistent page space.

React

Ready

Figma

React examples

Default

import {
  Button,
  DropdownMenu,
  DropdownMenuContent,
  DropdownMenuGroup,
  DropdownMenuItem,
  DropdownMenuLabel,
  DropdownMenuSeparator,
  DropdownMenuShortcut,
  DropdownMenuTrigger,
} from "@kela-systems/ui-components";

export default function DropdownMenuDefault() {
  return (
    <DropdownMenu>
      <DropdownMenuTrigger render={<Button variant="outline" />}>Camera 4</DropdownMenuTrigger>
      <DropdownMenuContent align="start">
        <DropdownMenuGroup>
          <DropdownMenuLabel>Camera 4, north gate</DropdownMenuLabel>
          <DropdownMenuItem>
            Open feed
            <DropdownMenuShortcut>⌘O</DropdownMenuShortcut>
          </DropdownMenuItem>
          <DropdownMenuItem>Export clip</DropdownMenuItem>
          <DropdownMenuItem>Rename</DropdownMenuItem>
        </DropdownMenuGroup>
        <DropdownMenuSeparator />
        <DropdownMenuItem variant="destructive">Remove camera</DropdownMenuItem>
      </DropdownMenuContent>
    </DropdownMenu>
  );
}

Props

No props of its own. It also takes the props of Base UI's menu.

No props of its own. It also takes the props of Base UI's menu.

No props of its own. It also takes the props of Base UI's menu.

No props of its own. It also takes the props of Base UI's menu.

No props of its own. It also takes the props of Base UI's menu.

NameDefaultDescription
inset
boolean

It also takes the attributes of the HTML element it renders.

NameDefaultDescription
variant
"default" | "destructive"
"default"
inset
boolean

It also takes the props of Base UI's menu.

NameDefaultDescription
inset
boolean

It also takes the props of Base UI's menu.

No props of its own. It also takes the props of Base UI's menu.

NameDefaultDescription
inset
boolean

It also takes the props of Base UI's menu.

No props of its own. It also takes the props of Base UI's menu.

No props of its own. It also takes the attributes of the HTML element it renders.

No props of its own. It also takes the props of Base UI's menu.

NameDefaultDescription
inset
boolean

It also takes the props of Base UI's menu.

No props of its own. It also takes the props of Base UI's menu.

Read this page as Markdown

Search ARK

Find a page, a primitive or a component.