ListItem

How to get ListItem

import { ListItem } from 'fds/components';

Type: Component

A type of list item that's rendered vertically and always uses the full available width. Should generally be rendered by either a List or VirtualList component.

Props

# Name Type Description
1. children ReactNode
2. [cursor] String

The cursor to use if the mouse is hovered over the component.

  Default value
"default"
3. [isDisabled] Boolean

Whether or not the component should be rendered in a disabled state.

  Default value
false
4. [isSelected] Boolean

Whether or not the component should be rendered in a selected state.

  Default value
false
5. [onClick] Function

A callback that is called whenever the component is clicked and is not in a disabled state.

For more information about React and "events", check the React documentation


  Arguments
# Name Type Description
1. event ReactSyntheticEvent
6. [onDoubleClick] Function

A callback that is called whenever the component is double clicked and is not in a disabled state.

For more information about React and "events", check the React documentation


  Arguments
# Name Type Description
1. event ReactSyntheticEvent
7. [tooltipContent] String | ReactElement

The content of the tooltip that is displayed when hovering over the whole component.

  • string: the textual content of the tooltip

  • ReactElement: a React Element (instance of a React Component, usually created with JSX)

  Default value
null

Related links

Was this page helpful?