List
Sizes
<script lang="ts">
  const items = [
    { label: 'Apple', id: 1 },
    { label: 'Banana', id: 2 },
    { label: 'Orange', id: 3 },
    { label: 'Peach', id: 4 },
  ]
  const options = [
    { label: 'xs', value: 'xs' },
    { label: 'sm', value: 'sm' },
    { label: 'md', value: 'md' },
    { label: 'lg', value: 'lg' },
    { label: 'xl', value: 'xl' },
  ]
  let selectedSize: 'xs' | 'sm' | 'md' | 'lg' | 'xl' = 'md'
</script>
<CRadioGroup bind:value={selectedSize} {options} />
<CList {items} size={selectedSize} /><script lang="ts">
  const items = [
    { label: 'Apple', id: 1 },
    { label: 'Banana', id: 2 },
    { label: 'Orange', id: 3 },
    { label: 'Peach', id: 4 },
  ]
  const options = [
    { label: 'xs', value: 'xs' },
    { label: 'sm', value: 'sm' },
    { label: 'md', value: 'md' },
    { label: 'lg', value: 'lg' },
    { label: 'xl', value: 'xl' },
  ]
  let selectedSize: 'xs' | 'sm' | 'md' | 'lg' | 'xl' = 'md'
</script>
<CRadioGroup bind:value={selectedSize} {options} />
<CList {items} size={selectedSize} />Divider
<script lang="ts">
  const items = [
    { label: 'Apple', id: 1 },
    { label: 'Banana', id: 2 },
    { label: 'Orange', id: 3 },
    { label: 'Peach', id: 4 },
  ]
</script>
<CList {items} divider /><script lang="ts">
  const items = [
    { label: 'Apple', id: 1 },
    { label: 'Banana', id: 2 },
    { label: 'Orange', id: 3 },
    { label: 'Peach', id: 4 },
  ]
</script>
<CList {items} divider />Use with CInfoItem
<script>
  const items = [
    { title: 'Notification', subtitle: 'Some notification description', icon: 'no', },
    { title: 'Personal', subtitle: 'Some personal description', icon: 'per' },
    { title: 'Settings', subtitle: 'Some settings description', icon: 'se' },
    { title: 'Exit', subtitle: 'Some exit description', icon: 'ex' },
  ]
  let activeItem = ''
  const handleItemClick = e => {
    activeItem = e.detail.title
  }
</script>
<CList {items}
  clickable
  activeFn={item => activeItem === item.title}
  on:item-click={handleItemClick}
>
  <CInfoItem
    slot="item"
    let:active
    let:itemObj
    title={itemObj.title}
    subtitle={itemObj.subtitle}
  >
    <div slot="icon" class={`${itemObj.icon}`}></div>
    <div slot="append" class:checked-icon={active} class="text-6"></div>
  </CInfoItem>
</CList>
<style>
  .no {
    --at-apply: 'i-carbon-notification text-8';
  }
  .per {
    --at-apply: 'i-ic-round-person text-8';
  }
  .se {
    --at-apply: 'i-ic-sharp-settings text-8';
  }
  .ex {
    --at-apply: 'i-mingcute-exit-line text-8';
  }
  .checked-icon {
    --at-apply: 'i-ic-baseline-check';
  }
</style><script>
  const items = [
    { title: 'Notification', subtitle: 'Some notification description', icon: 'no', },
    { title: 'Personal', subtitle: 'Some personal description', icon: 'per' },
    { title: 'Settings', subtitle: 'Some settings description', icon: 'se' },
    { title: 'Exit', subtitle: 'Some exit description', icon: 'ex' },
  ]
  let activeItem = ''
  const handleItemClick = e => {
    activeItem = e.detail.title
  }
</script>
<CList {items}
  clickable
  activeFn={item => activeItem === item.title}
  on:item-click={handleItemClick}
>
  <CInfoItem
    slot="item"
    let:active
    let:itemObj
    title={itemObj.title}
    subtitle={itemObj.subtitle}
  >
    <div slot="icon" class={`${itemObj.icon}`}></div>
    <div slot="append" class:checked-icon={active} class="text-6"></div>
  </CInfoItem>
</CList>
<style>
  .no {
    --at-apply: 'i-carbon-notification text-8';
  }
  .per {
    --at-apply: 'i-ic-round-person text-8';
  }
  .se {
    --at-apply: 'i-ic-sharp-settings text-8';
  }
  .ex {
    --at-apply: 'i-mingcute-exit-line text-8';
  }
  .checked-icon {
    --at-apply: 'i-ic-baseline-check';
  }
</style>CList Props
- itemsdefault:any[]undefinedThe list items data. 
- clickabledefault:booleanfalseDetermine whether item in list is clickable or not. 
- sizedefault:'xs' | 'sm' | 'md' | 'lg' | 'xl'=undefinedThe size of list. 
- activeFndefault:(item: any) => boolean=undefinedThe function that compute the active status of item. 
- dividerdefault:booleanfalseDetermine whether there is a divider between every item. 
CList Events
- item-clickEmit when item is clicked. 
CList Slots
- emptyCustomize the empty content 
- itemCustomize item Bindings: - itemObj   anythe item obj that holds the whole item data. 
- isClickable   booleanDetermine whether the item is clickable or not. 
- isActive   booleanDetermine whether the item is active or not. 
 
- itemObj   
CList Exports
CItem Props
- labeldefault:stringThe label text. 
- sizedefault:'xs' | 'sm' | 'md' | 'lg' | 'xl'=undefinedThe size of item. Notice that default value is 'md'instead ofundefined
- clickabledefault:booleanfalseDetermine whether the item is clickable or not. 
- activedefault:booleanfalseDetermine whether the item is active or not. Which will lead to different styles. 
CItem Events
- clickEmit when the item is clicked. It only take effect when the clickableprop is set totrue
CItem Slots
- default
CItem Exports
CInfoItem Props
- titledefault:stringThe title of the item. 
- subtitledefault:stringThe subtitle of the item. 
- iconAligndefault:'start' | 'center' | 'end'centerThe icon and title vertical align method. Also based on the CSS 
- sizedefault:'xs' | 'sm' | 'md' | 'lg' | 'xl'=undefinedThe size of item. 
CInfoItem Events
CInfoItem Slots
- iconThe icon content 
- titleCustomize title content. Notice that this slot would override the titleprop
- subtitleCustomize subtitle content. Notice that this slot would override the subtitleprop
- append