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

@dreamworld/dw-list-item

v4.3.10

Published

A material design item used to show single item of the list [More detail](https://material.io/components/lists/#)

Downloads

297

Readme

<dw-list-item> Published on npm

A material design item used to show single item of the list More detail

It also supports keyboard navigation. On Up/Down arrow key press it focuses next/previous sibling element. On Enter key press it selects the currently focused element.

Installation

npm install --save @dreamworld/dw-list-item

Usage

import "@dreamworld/dw-list-item/dw-list-item";

Basic (Single Line)

<dw-list-item title1="Item 1"></dw-list-item>

Two line

<dw-list-item title1="Main title" title2="Sub title" twoLine></dw-list-item>
<!-- Though, title2 isn't specified, will occupy 2 line height -->
<dw-list-item title1="Main title" twoLine></dw-list-item>

WIth leading and trailing icon

<dw-list-item title1="Item 1" leadingIcon="favorite" trailingIcon="done"></dw-list-item>

Disabled

<dw-list-item title1="Item 1" disabled></dw-list-item>

Dense

<dw-list-item title1="Item 1" dense></dw-list-item>

Property

| Name | Type | Default | Description | | -------------------- | --------------- | ----------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | title1 | String | undefined | Item's text to be shown in first line | | title2 | String | undefined | Item's text to be shown in the second line. | | dense | Boolean | false | Set to true to show dense item. Dense item will have less height compare to normal item | | leadingIcon | String | undefined | Name of icon to show as a leading icon | | trailingIcon | String | undefined | Name of icon to show as a trailing icon | | twoLine | Boolean | false | Set to true to show twoLine item | | disabled | Boolean | false | Shows disabled style when true | | selected | Boolean | false | Set to true to show item preselected. It will be set to true on click or enter. | | selectionMode | SelectionMode | default | Whether selection should be toggled or default/forced. if item isn't yet selected, it becomes selected. If item is already selected, no change in the selection state. While in toggle mode, selection is toggled. while in none mode, selection won't work so it's view-only item in this mode. Possible values: default, toggle, and none | | hasLeadingIcon | Boolean | false | Set to true when item has leading icon. | | hasTrailingIcon | Boolean | false | set to true when item has trailing icon. | | leadingIconFont | IconFont | FILLED | Type of the leading icon. Possible values: FILLED, and OUTLINED | | trailingIconFont | IconFont | FILLED | Type of the trailing icon. Possible values: FILLED, and OUTLINED | | tooltipPlacement | String | undefined | Use to set placement of tooltip. | | showSelectedRipple | Boolean | false | Set it to true to show ripples on the selected item. | | focusable | Boolean | true | Whether or not list-item is focusable. | | activated | Boolean | false | Whether or not list-item is activated. Same style as focused. | | highlight | String | undefined | Contains highlight words |

Events

| Name | Target | Detail | Description | | ------------------- | -------------- | ------ | ----------------------------------- | | selection-changed | dw-list-item | none | Triggers when selection is changed. |

CSS Custom Properties

| Name | Default | Description | | ----------------------------------- | --------------------- | ----------------------------------------------------------------------------------------- | | --mdc-theme-primary | #6200ee | Selected item's background color and icon color. | | --mdc-theme-text-primary | rgba(0, 0, 0, 0.87) | Primary title's text color. | | --mdc-theme-text-secondary | rgba(0, 0, 0, 0.6) | Sub title's text color. | | --mdc-theme-text-disabled | rgba(0, 0, 0, 0.38) | Disabled text color when item is disabled. | | --dw-icon-color | rgba(0, 0, 0, 0.38) | Icon color in normal mode. In selection mode --mdc-theme-primary color will be used | | --dw-icon-color-active | #6200ee | Leading and Trailing icon color. | | --dw-select-highlight-text-color | inherit | Highlight span text color | | --dw-select-highlight-bg-color | inherit | Highlight span backgroound color | | --dw-select-highlight-font-weight | inherit | Highlight span text font weight |