Navbox
Collapsible navbox. The header bar is the toggle — there is no separate
"[ Show/Hide ]" row. Pair it with {{Endnavbox}}. Content
between the two is wikitable rows; Navbox opens the {| for you.
Parameters (all named, all must be quoted)
-
title— header content. Any markup: text, images, divs, whatever the header needs. Include<span class=\"hw-navbox-arrow\"></span>where the toggle arrow should sit. -
color— master accent. Anything below that is left out falls back to this. Default#333333. -
border— outer border and header underline. Defaults tocolor. -
headerbg— header background. Defaulttransparent, matching the body. -
textcolor— header text. Defaults tocolor. -
style— extra CSS on the inner table.
Layout is the caller's job. title takes a block of markup and the header
is an ordinary block box, so a plain div stacks and a flex div sits things side by side.
Two classes are provided to save repeating the type sizes:
-
hw-navbox-title— bold, 1.15em -
hw-navbox-sub— 0.82em, slightly dimmed -
hw-navbox-arrow— the toggle chevron. Place it anywhere insidetitle; it points down when collapsed and up when expanded. Drawn from two rotated borders rather than a glyph, so it scales withfont-sizeand takes its color from the surrounding text.
Example — icon stacked above a centred title
{{Navbox|color="#000000"|title="![[icon.svg|56px|alt=Icon]]HeadingSubheading"}}
|-
| Row label
| Row content
{{Endnavbox}}
Quotes inside a quoted parameter are escaped as \". The arrow is driven by the
hw-collapsed class the engine sets on the collapsible div. Leave the span out
and the navbox still works, but nothing marks it as collapsible.