Dropdown
Basic usage
Here's some drop content
<CDropdown>
  <CButton label="Here's some trigger content" />
  <div slot="drop-content" class="p-4">Here's some drop content</div>
</CDropdown><CDropdown>
  <CButton label="Here's some trigger content" />
  <div slot="drop-content" class="p-4">Here's some drop content</div>
</CDropdown>svelte
   Click fold/expand code 
Content width
Here's some custom width drop content
<CDropdown widthWithinParent={false}>
  <CButton label="Here's some trigger content" />
  <div slot="drop-content" class="custom-width p-4">
    Here's some custom width drop content
  </div>
</CDropdown>
<style>
  .custom-width {
    width: 320px;
  }
</style><CDropdown widthWithinParent={false}>
  <CButton label="Here's some trigger content" />
  <div slot="drop-content" class="custom-width p-4">
    Here's some custom width drop content
  </div>
</CDropdown>
<style>
  .custom-width {
    width: 320px;
  }
</style>svelte
   Click fold/expand code 
Manual control
Click the left button to show dropdown
Here's some drop content
<script lang="ts">
  let show = false
</script>
<CButton label="Click to show dropdown" on:click={() => (show = !show)} />
<CDropdown manual bind:show>
  <div>Click the left button to show dropdown</div>
  <div slot="drop-content" class="p-4">Here's some drop content</div>
</CDropdown><script lang="ts">
  let show = false
</script>
<CButton label="Click to show dropdown" on:click={() => (show = !show)} />
<CDropdown manual bind:show>
  <div>Click the left button to show dropdown</div>
  <div slot="drop-content" class="p-4">Here's some drop content</div>
</CDropdown>svelte
   Click fold/expand code 
CDropdown Props
- showdefault:booleanfalseThe dropdown shown status. It is recommended to use bind:show.
- disableddefault:booleanfalseDetermine whether the dropdown is disabled or not. 
- widthWithinParentdefault:booleantrueDoes the dropdown content maintain the same width with parent. 
- manualdefault:booleanfalseIf set to true. Hover parent would not trigger dropdwon show.
CDropdown Events
No data
  CDropdown Slots
- defaultThe trigger content Bindings: - toggleManually   *The function to manually toggle shown status 
 
- toggleManually   
- drop-contentThe dropdown content 
CDropdown Exports
- toggleManuallyfunction