npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

@synerise/ds-items-roll

v0.6.109

Published

ItemsRoll UI Component for the Synerise Design System

Downloads

692

Readme


id: items-roll title: ItemsRoll

ItemsRoll UI Component

Installation

npm i @synerise/ds-items-roll
or
yarn add @synerise/ds-items-roll

Usage

import ItemsRoll from '@synerise/ds-items-roll';

<ItemsRoll
  items={items}
  onSearch={onSearch}
  onSearchClear={onSearchClear}
  searchValue={searchValue}
  searchPlaceholder={searchPlaceholder}
/>;

Demo

API

| Property | Description | Type | Default | | ---------------------------- | ----------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------- | ------- | | actions | ItemRollElement array with configuration for action dropdown menu | ItemRollElement[] | - | | changeSelectionIcon | The custom changeSelection icon | (props: React.SVGProps<SVGSVGElement>) => JSX.Element | EditM | | changeSelectionDropdownProps | Object with ds-dropdown props | DropdownProps | | | className | Additional class for ItemsRoll wrapper | string | - | | customSidebarActions | Allow put developer sidebar actions that are not defined | React.ReactNode | - | | groups | Array of strings where each one corresponds to a group prop in ItemRollElement | string[] | - | | hideSearch | Hide search component in itemsroll | booleam | - | | items | ItemRollElement array for list | ItemRollElement[] | - | | maxToShowItems | Amount of initial ItemsRollElement to render. Note that if number is greater than 20, list will becoma scrollable | number | 10 | | onClearAll | Callback function that is fired when click on clearAll button | () => void | - | | onChangeSelection | Callback function that is fired when click on changeSelection button | () => void | - | | onItemClick | Callback function that is fired when list element is clicked | (id: string, group?: string) => void | - | | onItemRemove | Callback function that is fired when list element remove icon is clicked | (id: string, group?: string) => void | - | | onSearch | Callback function that is fired when input changed | (value: string) => void | - | | onSearchClear | Callback function that is fired when input is cleared | () => void | - | | searchPlaceholder | Placeholder for search input component | string | - | | searchValue | Value of search input component | string | - | | showMoreStep | Amount of items to load on show more button click | number | 10 | | style | Object with CSS properties | React.CSSProperties | - | | texts | Object contains texts for buttons, title etc. | Texts | - | | useFooter | Whether the footer is visibile | boolean | - | | useVirtualizedList | Whether to use react-virtualized for list | boolean | false | | virtualizedRowHeight | Height of virtualizedlist row | number | 32px | | virtualizedRowWidth | Width of virtualized list | number | - |

ItemRollElement

| Property | Description | Type | Default | | -------- | ----------------------------------------------------------------------------------- | ------ | ------- | | group | Define affiliation to a specific group in groups Array passed as props to ItemsRoll | string | - | | id | Unique identifier for element. Used as a key in map | string | - |

Rest of the ItemRollElement props is inherited from MenuItemProps

Texts

| Property | Description | Type | Default | | ----------------------- | ----------------------------- | ------------------------ | ------------------ | | changeSelectionLabel | Change selection button label | string / React.ReactNode | 'Change selection' | | clearAllLabel | Clear all button label | string / React.ReactNode | 'Clear all' | | itemsLabel | Items label | string / React.ReactNode | 'Items' | | moreLabel | Show more second part label | string / React.ReactNode | 'more' | | noResultsLabel | No results label | string / React.ReactNode | 'No results' | | removeTooltipLabel | Tooltip for item remove icon | string / React.ReactNode | 'Remove' | | searchClearTooltipLabel | Input clear tooltip label | string / React.ReactNode | 'clear' | | showLabel | Show more first part label | string / React.ReactNode | 'Show' | | showLessLabel | Show less button label | string / React.ReactNode | 'Show less' |