Skip to content

CSS: wrapper

body[class~="instui-display-flex"] — Rhes app-shell: llywio ochr, cynhwysydd gyda phenawd, a phanel dewisol.

✅ Defnyddiwch Wrapper pan:

  • Wrth adeiladu tudalen cynnyrch Canvas lawn sydd ei hangen modrwy cynllun cyson

  • Mae'r dudalen yn defnyddio GlobalNav fel y prif gês llywio

  • Mae'r dudalen angen phaneli ochr: ContentTabList, TrailingContentArea, neu UtilityPanel

  • Mae angen padio cynhwysydd cyson a led uchaf cynnwys cyson ar draws y dudalen gyfan 🚫 Peidiwch ag defnyddio Wrapper pan:

  • Wrth adeiladu Modal, Tray, neu Drawer — mae gan y rhain eu cynwysyddion cynllun eu hunain

  • Wrapping o is-adran o dudalen — mae Wrapper yn cynnwys y dudalen gyfan, nid rhan

Hygyrchedd

  • Mapio'r ardal cynnwys prif i dirnod <main> gyda dolen skip-nav fel y gall defnyddwyr bysellfwrdd osgoi GlobalNav
  • Rhoddir ContentTabList role="navigation" gydag aria-label wahanol megis "Page navigation" — ar wahân i dirnod GlobalNav
  • Rhoddir TrailingContentArea role="complementary" gydag aria-label ddisgrifiadol sy'n adlewyrchu ei gynnwys, megis "Student details"
  • Rhoddir pob UtilityPanel aria-label wahanol: "AI assistant", "Notifications", neu "Filters"
  • Pan fydd UtilityPanel yn agor, symudwch ffocws i'r panel; pan fydd yn cau, dychgwch ffocws i'r sbardun a'i agorodd

Defnydd

css
@import "@pantoken/plugin-layouts/layouts.css";

Strwythur

text
body[class~="instui-display-flex"]
  side-nav-bar (component)
  .container
    modal.header (component)
      .top
        breadcrumb (component)
        .utilities (0..1)
          button + button (component, 1..n)
      .info
        .title
        .description (0..1)
      ‹content: header› (0..1)
      .actions (0..1)
        button + button (component, 1..n)
      tabs (component, 0..1)
        tabs (component)
      .filters (0..1)
        ‹content: filters›
    drawer-layout.content (component)
      list + card (component, 0..1)
      slot[name="content"].main
      slot[name="trailing"].trailing + card (component, 0..1)
  tabs.panel (component)
    card | agent-shell (component, 0..1)
flowchart TD n0["body[class~=&quot;instui-display-flex&quot;]"]:::cssdoc-root n1(["side-nav-bar"]):::cssdoc-component n2(".container"):::cssdoc-part n3(["modal.header"]):::cssdoc-component n4(".top"):::cssdoc-part n5(["breadcrumb"]):::cssdoc-component n6(".utilities"):::cssdoc-part n7(["button + button"]):::cssdoc-component n8(".info"):::cssdoc-part n9(".title"):::cssdoc-part n10(".description"):::cssdoc-part n11[/"‹content: header›"/]:::cssdoc-slot n12(".actions"):::cssdoc-part n13(["button + button"]):::cssdoc-component n14(["tabs"]):::cssdoc-component n15(["tabs"]):::cssdoc-component n16(".filters"):::cssdoc-part n17[/"‹content: filters›"/]:::cssdoc-slot n18(["drawer-layout.content"]):::cssdoc-component n19([".list + card"]):::cssdoc-component n20("slot[name=&quot;content&quot;].main"):::cssdoc-part n21(["slot[name=&quot;trailing&quot;].trailing + card"]):::cssdoc-component n22(["tabs.panel"]):::cssdoc-component n23(["card | agent-shell"]):::cssdoc-component n0 --> n1 n4 --> n5 n6 -->|1..n| n7 n4 -.->|0..1| n6 n3 --> n4 n8 --> n9 n8 -.->|0..1| n10 n3 --> n8 n3 -.->|0..1| n11 n12 -->|1..n| n13 n3 -.->|0..1| n12 n14 --> n15 n3 -.->|0..1| n14 n16 --> n17 n3 -.->|0..1| n16 n2 --> n3 n18 -.->|0..1| n19 n18 --> n20 n18 -.->|0..1| n21 n2 --> n18 n0 --> n2 n22 -.->|0..1| n23 n0 --> n22 click n1 "/api/css/side-nav-bar.md" click n3 "/api/css/modal.header.md" click n5 "/api/css/breadcrumb.md" click n7 "/api/css/button.md" click n13 "/api/css/button.md" click n14 "/api/css/tabs.md" click n15 "/api/css/tabs.md" click n18 "/api/css/drawer-layout.content.md" click n19 "/api/css/card.md" click n21 "/api/css/card.md" click n22 "/api/css/tabs.panel.md" classDef cssdoc-root stroke-width:1px; classDef cssdoc-part stroke-width:1px; classDef cssdoc-slot stroke-width:1px; classDef cssdoc-component stroke-width:1px;

Slotiau

SlotDisgrifiad
contentCynnwys prif y dudalen.
filtersCynnwys hidlyddion dewisol o fewn y phenawd.
headerSlot penawd dewisol o dan ddisgrifiad y dudalen.
panelCynnwys panel defnyddiol.
trailingCynnwys ategol diweddar.

Rhannau

RhanDisgrifiad
.actionsBotymau penawd dewisol ar ddiwedd y rhes uchaf.
.containerColofn brif y dudalen sy'n dal y penawd a'r cynnwys.
.contentArdal cynnwys gyntaf o fewn colofn y cynhwysydd.
.descriptionDisgrifiad tudalen dewisol o dan y teitl.
.filtersArdal hidlyddion dewisol o fewn y phenawd.
.headerArdal penawd o fewn colofn y cynhwysydd.
.infoCynhwysydd ar gyfer teitl y dudalen a disgrifiad dewisol.
.listColofn llywio dewisol o fewn y cynnwys.
.mainColofn cynnwys prif o fewn y cynnwys.
.panelArdal panel defnyddiol sy'n agor ar ochr dde'r dudalen.
.tabsTabiau llywio dewisol yng nghychwynnol y rhes cynnwys.
.titleTeitl y dudalen o dan y rhes uchaf.
.topRhes grid sy'n cynnwys llwybrau crwbnd a gweithrediadau defnyddiol.
.trailingColofn ategol dewisol o fewn y cynnwys.
.utilitiesGweithrediadau defnyddiol ar ddiwedd y rhes uchaf.

Statwsau

StatwsDisgrifiad
:optional

Tocynnau a ddefnyddiwyd

TokenMathGwerth
--instui-background-color-page

Is-gydrannau

Perthnasol