Use `data-panel-target` plus `data-panel-open="small|medium|large"` on any button.
Open any sheet with plain buttons and named snap sizes.
The component now supports declarative triggers, semantic snap names, drag damping, body-scroll handoff, background scaling, and a cleaner Web Component API.
Current state: closedThe panel only steals a touch from scrolling content when that touch started at the top.
Small, medium, and large map to different snap fractions on mobile and desktop.
When you publish the component, put the script on your CDN and paste this into your site.
Replace the URL above with your real hosted file.
Add the script tag to your page.
Wrap your website content in an element with `data-panel-app`.
Add an `<app-panel>` with an `id`, then connect buttons to it.
This is the easiest version for a normal website. Paste it into your page and change the words.
These three buttons all open the same panel, but at different snap sizes.
Small is good for quick actions, menus, or short notices.
Medium is the best default for most websites.
Large is best when the panel contains lots of text, forms, or scrolling content.
Use this when you want the same button to open and close the panel.
These controls change the current panel without extra JavaScript.
If you want the panel to already be visible on page load, add `open`.
You can change the look without editing the component file.
You do not need JavaScript for normal use, but it is available if you want it.
You can listen for open, close, and snap changes.