Skip to content

pantoken / renderers/web-components/src / drawerLayout

वैरिएबल: drawerLayout

const drawerLayout: ElementDefinition

अल्फा

&lt;instui-drawer-layout&gt; — a side tray plus main content area. The open attribute reveals the tray; placement (start|end) picks the side. Drivable from light DOM via Invoker Commands: <button command="--toggle|--open|--close" commandfor="drawer-id">. Content goes in the default slot; the tray in slot="tray". The interactions behavior auto-toggles overlay mode based on the --pantoken-bp-md threshold.

एक्सेसिबिलिटी

सामग्री पैन में role="region" होता है, जो InstUI के DrawerLayout से मेल खाता है; आसपास के संदर्भ में पहले से नामित न होने पर इसे aria-label/aria-labelledby से लेबल करें।

उदाहरण

html
<button command="--toggle" commandfor="drawer">Toggle panel</button>
<instui-drawer-layout id="drawer" open placement="start">
  <nav slot="tray">…</nav>
  <article>Main content</article>
</instui-drawer-layout>