PopoverItem
A standalone menu item: action or link.
The same component as Popover.Item. Pass href for navigation; use borderTop and borderBottom for separators and badge for a badge. Inside a Popover, the popup closes after a click.
Live example
Example controls
Usage
import { PopoverItem } from '@prosazhin/pbcomponents';
<PopoverItem href='/projects'>Projects</PopoverItem>;Component API
| Prop | Type / variants | Purpose | Default |
|---|---|---|---|
children | string | Component content. | — |
disabled | boolean | Disables interaction. | false |
borderTop | boolean | Divider above the item. | false |
borderBottom | boolean | Divider below the item. | false |
badge | ReactElement<BadgeProps> | Badge to the right of the label. | — |
leftIcon | SvgTypenone · check · search · user | Icon before the text; accepts an SVG component. | — |
rightIcon | SvgTypenone · check · search · user | Icon after the text; accepts an SVG component. | — |
leftIconClassName | string | Class of the left icon. | — |
rightIconClassName | string | Class of the right icon. | — |
onClick | (event) => void | Item click handler; the popup closes afterwards. | — |
href | string | Renders a link instead of a button. | — |
linkComponent | ElementType | Custom link component, such as Next.js Link. | — |
target | '_self' | '_blank'_self · _blank | Where to open the link. | _self |
type | 'button' | 'reset' | 'submit'button · reset · submit | HTML button type. | button |
className | string | Class of the root element. | — |
wrapperClassName | string | Class of the outer wrapper. | — |
textClassName | string | Class of the text part. | — |
Native HTML attributes are accepted where the component renders the corresponding element. className props only affect styling.