Components
Built-in MDX components, available in every page without imports.
On this page
These components are available in all .mdx pages, without importing them. They render to static HTML, and only tabs ship a few lines of JavaScript. Plain .md pages cannot use components: rename the file to .mdx when a page needs one.
The component form of callouts.
<Callout type="warning" title="Heads up">
Callouts can contain **any** Markdown content.
</Callout><Cards>
<Card title="Installation" href="/installation/" icon="zap">
Get started in a few minutes.
</Card>
</Cards>Tabs sharing a groupId switch together, and persist remembers the choice across pages. items sets the order of the tab list; without it, the list is built from the value of each <Tab>. defaultValue picks the tab shown first.
JavaScript
export const add = (a, b) => a + b;TypeScript
export const add = (a: number, b: number) => a + b;JavaScript
This tab switches along with the one above.TypeScript
So does this one.<Tabs items={['JavaScript', 'TypeScript']} groupId="language" persist>
<Tab value="JavaScript">…</Tab>
<Tab value="TypeScript">…</Tab>
</Tabs>Without JavaScript, all tabs are displayed one after the other.
You can also wrap a series of level 3 headings in <Steps> without using <Step>, as on the installation page.
Accordions use the native <details> element. Accordions with the same group close each other, and open expands one when the page loads.
Does ZenithDocs need JavaScript?
No. Pages are fully usable without it.
Can I use my own components?
Yes, import any Astro component in an MDX page.
src
content
<Files>
<Folder name="src" defaultOpen>
<File name="content.config.ts" />
</Folder>
<File name="astro.config.mjs" />
</Files>One of the built-in icons, inline in the text: . Give it a label when the icon carries meaning on its own, so screen readers announce it.
Press <Icon name="search" label="Search" /> to search.Renders operations of an OpenAPI document, see OpenAPI.
<APIPage spec="rockets" path="/rockets" method="get" />