1.0.10 • Published 1 month ago

@synerise/ds-list-item v1.0.10

Weekly downloads
-
License
ISC
Repository
github
Last release
1 month ago

id: list-item

title: ListItem

ListItem UI Component

Installation

npm i @synerise/ds-list-item
or
yarn add @synerise/ds-list-item

Usage

import ListItem from '@synerise/ds-list-item'

<ListItem />

Demo

API

PropertyDescriptionTypeDefault
classNameExtra stylesstring-
childrenListItem contentReact.ReactNode-
checkedfor type="select" it renders a check icon as suffix, for other types only an additional classnameboolean-
copyableAllow copying value by clickingboolean-
copyHintContent that disaplys on hover if copyableReactNode-
copyValueValue that gets copied to clipboardstring-
copyTooltipContent displayed in tooltip after copyingReactNode-
description2nd line of content in itemReactNode-
disabledrenders disabled / unclickable itemboolean-
higherApplies to type "divider" onlyboolean-
highlightstring to highlight in itemsstring-
hoverTooltipPropsProps for hover tooltip. see rc-trigger for detailsTriggerProps & { ref?: React.LegacyRef<TriggerHandle> }-
keyunique keystring / number-
levelApplies to type "divider" onlynumber-
onItemHoverhoverHandler(item: ItemData<MouseEvent<HTMLDivElement>>) => void-
onClickonClick handler(item: ItemData<MouseEvent<HTMLDivElement>>) => void-
orderedrenders ordinal numbers in itemsboolean-
parentif true will display an arrow icon next to labelboolean-
prefixelprefix elementReactNode | AddonRenderer-
prefixVisibilityTriggerdrives prefix visibility'hover' | 'default'-
renderHoverTooltipTooltip to display on item hover() => JSX.Element-
sizeheight of the item'default' | 'large''default'
suffixelsuffix element. Item with type="select" and checked also displays a check iconReactNode | AddonRenderer-
suffixVisibilityTriggerdrives suffix visibility'hover' | 'default'-
textprop alternative to childrenReactNode-
timeToHideTooltipcopy tooltip delaynumber-
titletitle attribute (a11y prop)string-
tooltipPropsTooltip props for "copied" tooltip. See @synerise/ds-tooltipTooltipProps-
typeType of the list item"default" | "danger" | "divider" | "select"-

AddonRenderer

    type AddonRenderer = (hovered: boolean) => ReactNode;

ItemData

prop passed to onClick and onItemHover handlers

PropertyDescriptionType
keyitem keystring
itemclicked / hovered item dataPartial
domEventEvent triggeredMouseEvent<HTMLDivElement>
1.0.2

4 months ago

1.0.1

4 months ago

1.0.0

4 months ago

1.0.9

2 months ago

1.0.8

2 months ago

1.0.7

2 months ago

1.0.6

3 months ago

1.0.5

3 months ago

1.0.4

3 months ago

1.0.3

3 months ago

1.0.10

1 month ago

0.7.7

4 months ago

0.7.6

4 months ago

0.7.5

4 months ago

0.7.4

5 months ago

0.7.3

5 months ago

0.7.2

5 months ago

0.7.1

5 months ago

0.7.0

5 months ago

0.6.3

6 months ago

0.6.2

6 months ago

0.5.0

7 months ago

0.5.1

7 months ago

0.4.19

8 months ago

0.4.17

8 months ago

0.4.18

8 months ago

0.6.1

7 months ago

0.6.0

7 months ago

0.4.15

9 months ago

0.4.16

9 months ago

0.4.14

9 months ago

0.4.13

9 months ago

0.4.12

10 months ago

0.4.9

10 months ago

0.4.8

10 months ago

0.0.25

1 year ago

0.4.10

10 months ago

0.4.11

10 months ago

0.1.0

1 year ago

0.3.0

1 year ago

0.2.0

1 year ago

0.1.1

1 year ago

0.4.5

11 months ago

0.4.4

11 months ago

0.4.7

10 months ago

0.4.6

11 months ago

0.4.1

12 months ago

0.4.0

1 year ago

0.4.3

11 months ago

0.4.2

12 months ago

0.0.24

1 year ago

0.0.23

1 year ago

0.0.21

1 year ago

0.0.22

1 year ago

0.0.20

1 year ago

0.0.19

1 year ago

0.0.18

1 year ago

0.0.17

1 year ago

0.0.16

1 year ago

0.0.15

1 year ago

0.0.14

1 year ago

0.0.13

1 year ago

0.0.12

1 year ago

0.0.10

1 year ago

0.0.11

1 year ago

0.0.9

1 year ago

0.0.8

1 year ago

0.0.7

1 year ago

0.0.6

1 year ago

0.0.5

2 years ago

0.0.4

2 years ago

0.0.3

2 years ago

0.0.2

2 years ago

0.0.1

2 years ago