Skip to main content

Aside

shadow

wje-aside is a layout primitive for supporting content next to wje-main. It is typically used for secondary navigation, filters, summaries, state panels, or helper actions.

Example usage in a layout

The example below shows several common layout combinations with wje-container, wje-header, wje-main, and wje-footer. Pay special attention to the width attribute, which controls the side-column width in each layout.

Things To Keep In Mind

  • Content is projected through the default slot.
  • The width attribute populates --wje-aside-width, which controls the resulting panel width.
  • When fixed is present, the component uses position: fixed on desktop breakpoints.
  • top works together with fixed and sets the top offset through --wje-aside-top.
  • On smaller viewports the aside is hidden by default. The top-start variant and open class affect layout, not built-in state management.

Accessibility

  • Use it where secondary content genuinely belongs beside main, not instead of it.
  • Preserve a logical document structure and focus order.
  • If the panel becomes a mobile overlay controlled by parent logic, make sure focus management is handled at that higher level.

Best Practices

  • Choose width intentionally based on the content type; navigation often works best with a stable fixed width, while richer supporting content may benefit from token-based sizing.
  • If you use fixed, also think about top so the aside does not overlap a fixed header.
  • Test mobile behavior separately; a good desktop layout does not automatically translate into good small-screen UX.
  • Keep the side panel for supporting content, not for the one piece of information users absolutely need to finish the main task.

Attributes and Properties

fixed

DescriptionPins the aside in a fixed desktop position instead of keeping it in normal flow.
Attributefixed
Typeboolean
Default-

top

DescriptionSets the top offset used together with the fixed layout mode.
Attributetop
Typestring
Default-

variant

DescriptionSelects an alternate layout variant such as the mobile top-start drawer style.
Attributevariant
Typestring
Default-

width

DescriptionSets the width of the aside column, typically through a CSS length or design token.
Attributewidth
Typestring
Default-

Events

No events available for this component.

Methods

No public methods available for this component.

CSS Shadow Parts

No CSS shadow parts available for this component.

CSS Custom Properties

NameDescription
--wje-aside-widthControls the width of the aside column.
--wje-aside-topControls the top offset of a fixed aside.
--wje-aside-border-colorControls the border color of the aside.
--wje-aside-border-widthControls the border width of the aside.
--wje-aside-border-styleControls the border style of the aside.

Slots

NameDescription
defaultSlot for the aside content.