ListItem

Type: React component

How to get ListItem?

JavaScript

import { ListItem } from 'fds/components';

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

  1. children

    (Required)

    Type: ReactNode

  2. cursor

    (Optional)

    Type: String

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

    Related links

    Default value

  3. isDisabled

    (Optional)

    Type: Boolean

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

    Default value

  4. isSelected

    (Optional)

    Type: Boolean

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

    Default value

  5. onClick

    (Optional)

    Type: 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

    Default value

  6. onDoubleClick

    (Optional)

    Type: 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

    Default value

  7. tooltipContent

    (Optional)

    Type: 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