Dropdown

The Dropdown component displays a menu to the user, such as a set of actions or functions, triggered by a button.

Preview

Gravity dropdown component

Usage

Props

Prop
Description
Required
Value

children

children to render

required

component(s)

className

custom class

optional

SCSS or Tailwind

inset

toggle triggle style

optional

boolean

Example

Notes

  • The Dropdown component uses DropdownMenuPrimitive components from @radix-ui/react-dropdown-menu.

  • The children prop is required and should include the elements to be displayed in the dropdown.

  • The className prop allows for custom styling.

  • The inset prop toggles the trigger style.

  • For more details, refer to the Shadcn Dropdown Menu documentation.

Last updated

Was this helpful?