Term Explainer
TermExplainer
A "terms you should know" section. It renders a white Divider with the category name, then picks two random terms from that category in src/data/termsForTermExplainer.json and shows each with its title and description side by side. The random pick happens on the client after hydration, so the server-rendered page starts with no terms and fills in on load.
Used on /governance, /governance/accountability, and /constitution, always inside a gradientLight Background Wrapper.
Basic Usage
From src/pages/constitution.js:
import BackgroundWrapper from '@site/src/components/Layout/BackgroundWrapper';
import BoundaryBox from '@site/src/components/Layout/BoundaryBox';
import TermExplainer from '@site/src/components/TermExplainer';
<BackgroundWrapper backgroundType="gradientLight">
<BoundaryBox>
<TermExplainer category="governance" />
</BoundaryBox>
</BackgroundWrapper>
Props
| Prop | Type | Default | Description |
|---|---|---|---|
category | string | - | Key under categories in src/data/termsForTermExplainer.json. Currently staking, catalyst, governance, or cip. An unknown key renders the divider with no terms. |