ListItem

Install

yarn add @ntds/list

Import

import { ListItem } from '@ntds/list';

Props

ListItem

PropType & Description
showPointerOnHover
boolean

Whether to show a pointer cursor on hover. Defaults to false. If a button is being rendered, it will always show a pointer cursor on hover regardless of this prop.

rightIcon
FC<IconProps> | ReactNode

An icon to display on the far right side of the list item.

onClick
() => void

Action to perform on click.

icon
FC<IconProps> | ReactNode

An icon to display to the left of the title.

title
ReactNode

Title of the list item

subTitle
ReactNode

Subtitle of the list item, displayed below the title.

rightItem
ReactNode

An item displayed on the right side of the list item. This can be an icon, button, switch, or any other React node.

render
(props: ListItemWrapperRenderProps) => Element

Hook into the top render method of the wrapping element.

This guide is based on version: 3.0.1