1.0.0-rc.7 • Published 6 months ago

@morpheme/list v1.0.0-rc.7

Weekly downloads
-
License
MIT
Repository
-
Last release
6 months ago

Morpheme List

Morpheme List component is used for creating list, grouping list and creating menus.

Installation

npm

npm i @morpheme/list

yarn

yarn add @morpheme/list

pnpm

pnpm i @morpheme/list

Usage

This package provides 5 components: List, ListItem, ListItemDivider, ListItemHeader, ListCollapse.

Basic Usage

<script setup lang="ts">
import {List, ListItem, ListItemDivider} from '@morpheme/list';
import '@morpheme/list/dist/style.css';
</script>

<template>
  <List>
    <ListItem>Item 1</ListItem>
    <ListItem>Item 2</ListItem>
    <ListItemDivider />
    <ListItem>Item 3</ListItem>
    <ListItemDivider />
    <ListItem>Item 4</ListItem>
    <ListItem>Item 5</ListItem>
  </List>
</template>

List with icons

<template>
  <List v-bind="args">
    <ListItem prepend-icon="ri:user-line"> Item 1 </ListItem>
    <ListItem prepend-icon="ri:search-line"> Item 2 </ListItem>
    <ListItemDivider />
    <ListItem append-icon="ri:search-line"> Item 3 </ListItem>
    <ListItem append-icon="ri:search-line"> Item 4 </ListItem>
    <ListItemDivider />
    <ListItem prepend-icon="ri:home-line" append-icon="ri:search-line">
      Item 5
    </ListItem>
    <ListItem prepend-icon="ri:user-line" append-icon="ri:arrow-downs-line">
      Item 6
    </ListItem>
  </List>
</template>

Collapsing List

<template>
  <List>
    <ListItem prepend-icon="ri:home-2-line"> Home </ListItem>
    <ListCollapse>
      <template #activator="{isOpen, toggle}">
        <ListItem
          prepend-icon="ri:book-line"
          append-icon="ri:arrow-down-s-line"
          :append-icon-class="isOpen ? 'rotate-180' : ''"
          @click="toggle"
        >
          Blog
        </ListItem>
      </template>
      <List>
        <ListItem> Add New Post </ListItem>
        <ListItem> View Comments </ListItem>
      </List>
    </ListCollapse>
    <ListCollapse>
      <template #activator="{isOpen, toggle}">
        <ListItem
          prepend-icon="ri:user-line"
          append-icon="ri:arrow-down-s-line"
          :append-icon-class="isOpen ? 'rotate-180' : ''"
          @click="toggle"
        >
          Shop
        </ListItem>
      </template>
      <List>
        <ListItem> View Dashboard </ListItem>
        <ListItem> Sales </ListItem>
      </List>
    </ListCollapse>
  </List>
</template>

Documentation

View full documentation here.

License

MIT

1.0.0-canary1.74

9 months ago

1.0.0-next.39

10 months ago

1.0.0-edge.2

7 months ago

1.0.0-canary.7

8 months ago

1.0.0-edge.7

7 months ago

1.0.0-next.37

10 months ago

1.0.0-next.40

10 months ago

1.0.0-alpha.1

6 months ago

1.0.0-alpha.100

7 months ago

1.0.0-canary2.75

9 months ago

1.0.0-rc.7

6 months ago

1.0.0-rc.5

7 months ago

1.0.0-rc.6

6 months ago

1.0.0-beta.11

10 months ago

1.0.0-next2.41

10 months ago

1.0.0-edge.11

7 months ago

1.0.0-rc.3

7 months ago

1.0.0-rc.4

7 months ago

1.0.0-next.4

10 months ago

1.0.0-rc.1

8 months ago

1.0.0-next.5

10 months ago

1.0.0-rc.2

8 months ago

1.0.0-rc.0

8 months ago

1.0.0-beta.10

11 months ago

1.0.0-alpha.40

1 year ago

1.0.0-alpha.32

1 year ago

1.0.0-alpha.53

1 year ago

1.0.0-alpha.284

11 months ago

1.0.0-alpha.283

11 months ago

1.0.0-alpha.282

11 months ago

1.0.0-beta.9

12 months ago

1.0.0-alpha.27

1 year ago

1.0.0-alpha.222

11 months ago

1.0.0-alpha.286

11 months ago

1.0.0-alpha.69

12 months ago

1.0.0-alpha.246

11 months ago

1.0.0-alpha.114

12 months ago

1.0.0-alpha.79

12 months ago

1.0.0-beta.8

1 year ago

1.0.0-alpha.13

1 year ago

1.0.0-alpha.6

1 year ago

1.0.0-beta.7

1 year ago

1.0.0-alpha.46

1 year ago

1.0.0-alpha.37

1 year ago

1.0.0-beta.6

1 year ago

1.0.0-beta.5

1 year ago