New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@synerise/ds-menu

Package Overview
Dependencies
Maintainers
0
Versions
236
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@synerise/ds-menu

Menu UI Component for the Synerise Design System

  • 0.20.12
  • latest
  • Source
  • npm
  • Socket score

Version published
Maintainers
0
Created
Source

id: menu title: Menu

Menu UI Component

Installation

npm i @synerise/ds-menu
or
yarn add @synerise/ds-menu

Usage

import Menu from '@synerise/ds-menu'

const items = [
  {
    text: 'Item 1',
    copyable: true,
    copyHint: 'Copy to clipboard',
    copyValue: 'Item 1',
    copyTooltip: 'Copied Item 1!'
  },
 {
    text: 'Item 2',
    copyable: true,
    copyHint: 'Copy to clipboard',
    copyValue: 'Item 2',
    copyTooltip: 'Copied Item 2!'
  },
];

// Render using dataSource passed as prop
<Menu  dataSource={items} />

// Render using dataSource mapping to Menu.Item
<Menu>
    {items.map(item => <Menu.Item {...item}/>}
</Menu>

Demo

Menu

PropertyDescriptionTypeDefault
asDropdownwMenuAdd additional styles for dropdown menubooleanfalse
dataSourceArray of items to display in menuMenuItemProps[]-
orderedDetermines if items should be displayed with index prefix (starting from 01)booleanfalse
maxToShowItemslimits the number of items rendered. remaining are shown after button clicknumber-
textscustom translationsMenuTexts-

MenuItemProps

PropertyDescriptionTypeDefault
childrenChildren of the itemReact.ReactNode
copyableBoolean to enable option of copying the value to the clipboardbooleanfalse
copyHintText displayed on hovering copyable itemstring
copyValueValue to be copied to clipboard when copyable item is clickedstring
copyTooltipTooltip to be displayed when copyable item is clickedstring / React.ReactNode
disabledDisable an item elementbooleanfalse
descriptionAdditional description displayed inside the itemstring / React.ReactNode
highlightText to be highlighted inside the itemstring
indentLevelIndent level of the text inside the item.Number0
parentBoolean to display arrow for parent itembooleanfalse
prefixelPrefix element node or a function to render it.(hovered: boolean) => React.ReactNode / React.ReactNode-
prefixVisibilityTriggerTrigger for displaying the prefix elementdefault / hoverdefault
sizeSize of the item. Affects the maximum and minimum height.default / largedefault
suffixelSuffix element node or a function to render it.(hovered: boolean) => React.ReactNode / React.ReactNode-
suffixVisibilityTriggerTrigger for displaying the suffix elementdefault / hoverdefault
subMenuArray of nested itemsMenuItemProps[]
textText displayed inside the itemstring / React.ReactNode-
typeType of the itemdefault / select / dangerdefault

MenuTexts

PropertyDescriptionTypeDefault
showLesstoggle button labelReactNode-
showMoretoggle button labelReactNode-

FAQs

Package last updated on 21 Jan 2025

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc