API
Usage and API reference
CwDrawer is a bottom panel that collapses to a summary bar. Use it for secondary detail, such as a device list under a map, that people open when they need it.
Copy-paste examples
Each snippet is a complete, working example you can paste into a Svelte 5 component.
Drawer with status summary
<script lang="ts">
import { CwDrawer } from '@cropwatchdevelopment/cwui';
let open = $state(false);
</script>
<CwDrawer
bind:open
label="Devices"
items={[
{ id: 'ok', label: '12 online', tone: 'success' },
{ id: 'warn', label: '2 warnings', tone: 'warning' }
]}
>
<p>Device list goes here.</p>
</CwDrawer>