Skip to content
Razor catalogue

On this page

@addTagHelper *, Webority.Ui.Razor

Beside a list

Open an item beside a list you keep working in, and close the pane with Escape.

Three items and a pane
Each button asks this page's Pane handler for its item's card, and the pane shows it. Escape acts only while focus is inside the pane. A dialog open over the page keeps its own Escape.
Show code
<button type="button" data-wui-pane="/Components/AppDetailPane?handler=Pane&id=1" data-wui-pane-target="#demo-pane">Leave request: 3 days</button>
<app-detail-pane id="demo-pane" label="Request details"></app-detail-pane>

public IActionResult OnGetPane(int id)
{
    DetailPaneItem? item = Find(id);
    return item is null ? NotFound() : Partial("_AppDetailPaneCard", item);
}

Every option

Every value of every prop, one cell each.

open

open={false} (default): React only, here an empty pane stays hidden

Closed, the pane is hidden.

open={true}: React only, here the pane shows once it has content

label

label: the accessible name of the pane, no visual change

sticky

sticky="true" (default)
sticky="false"

onClose

onClose: React only, here the Close button below closes the pane

children

children: the pane's content (React: children)

className

className: extra classes on the pane (React: className)

id

id: the pane's id, which a trigger names in data-wui-pane-target (React: id)

data-wui-pane

data-wui-pane: the URL whose card fills the pane (React: open)

data-wui-pane-close

data-wui-pane-close: on a button in the card, closes the pane (React: onClose)

wui:pane:loaded

wui:pane:loaded: raised on the pane when a card is shown (React: read open)

Guidance

What to do, and what to avoid.

Use it when

  • A person keeps working in a list and reads the details of one item beside it.
  • Choosing an item should not change page, and the list must stay where it is.

Reach for something else when

  • The items form a queue the person works through one by one. → AppSplitView
  • The detail is an overlay that covers the page. → AppDrawer
  • The detail is a short task that interrupts the flow. → AppModal

Beside the list it details

Do

The pane sits beside the list it details. Escape inside it calls onClose.

Avoid

Use a detail pane to cover the page or hold a multi-step task; use AppDrawer or AppModal for that.

Reference

Try every prop, read the full list, and check keyboard and screen reader behaviour.

true false
React, generated from the controls
<AppDetailPane open={true} label="Request details" sticky={true}>
  ...
</AppDetailPane>
Razor, the same props
<app-detail-pane id="pg-pane" label="Request details"></app-detail-pane>

6 props. The 2 most used come first.

Used on most screens 2 props

PropTypeDefaultDescription
labeldefault - string - The accessible name of the pane region.
stickydefault true bool true Keeps the pane in view under the top bar while the list beside it scrolls.

Less common 4 props

PropTypeDefaultDescription
iddefault - string - The pane's id, which the trigger names in data-wui-pane-target. Required.
data-wui-panedefault - url - On a trigger: the URL whose card fills the pane. Used with data-wui-pane-target.
data-wui-pane-closedefault - attribute - On a button in the card: closes the pane.
wui:pane:loadeddefault - event - Raised on the pane when a card is shown. Also wui:pane:error, wui:pane:success and wui:pane:closed.

Screen reader

2 notes
  • The pane is a region named by label. Escape inside it calls onClose.
  • A closed pane is hidden from assistive technology, so it is not read while it is closed.

Do and avoid

1 pairs

Beside the list it details

Do

The pane sits beside the list it details. Escape inside it calls onClose.

Avoid

Use a detail pane to cover the page or hold a multi-step task; use AppDrawer or AppModal for that.