Skip to main content

Target

The target prop is used to specify the target of a link within a menu item. It determines how the link will be opened when clicked. Additionally, you can use the rel prop to set the rel attribute of the link, which specifies the relationship between the current document and the linked document.

The target prop accepts a string value that represents the target option for the link. The most commonly used target options are:

targetDescription
_selfOpens the link in the same browsing context
_blankOpens the link in a new tab or window.
_parentOpens the link in the parent browsing context (if available).
_topOpens the link in the top-level browsing context.

Props

target?: string
rel?: string
Default Value
target='_self'

Example

/horizontal-menu/menu-item/target

Source Code