mica

Example

sidecar
content

Basic usage

<m-sidecar>
  <nav>…</nav>
  <main>…</main>
</m-sidecar>

API

Pairs one fixed-width sidecar with flexible content and stacks them when space is narrow.

Attributes

NameType/ValuesDefaultDescription
gapnone · 2xs · xs · sm · md · lg · xl · 2xlmdSets the space between the pair.
sideendstartMakes the last child the sidecar without visual reordering.
side-widthxs · sm · mdxsSets the sidecar's preferred width.

Content/markup contract

NameType/ValuesDefaultDescription
Childrenexactly twofirst child is fixedThe first child is the sidecar and the last is flexible content. With side="end", the last child is the sidecar.
← gridswitcher →