Skip to main content

MDC components

Authoring reference for the canonical Ginko Docs prose components and their two appearances.

Ginko Docs exposes one canonical tag for each authored concept. Native Markdown remains the default for prose, headings, lists, links, images, code fences, and GFM alerts.

Use only static scalar props inline. Put arrays, objects, and booleans in YAML frontmatter inside the component. Dynamic bindings, events, directives, arbitrary styles, and bare boolean attributes are rejected.

Appearance

Surface components accept appearance="quiet" or appearance="tint". The component prop overrides its family setting, which overrides the global setting:

app/app.config.ts
export default defineAppConfig({
  ginkoDocs: {
    prose: {
      appearance: "quiet",
      components: {
        callout: "tint",
        aside: "tint",
        excerpt: "tint",
        tabs: "tint",
      },
    },
  },
});

Appearance-aware families are callouts, aside, excerpt, cards, read-more, accordion, tabs, code, files, API, figure, quiz, steps, and timeline.

Notices and supporting prose

Use GFM alerts when one of its five portable meanings fits:

content/docs/routes.md
> [!WARNING]
> Keep translated numeric identities aligned.
TagPropsContent
note, info, success, warning, error, ideatitle?, icon?, appearance?Prose
asidelabel?, appearance?Prose
excerptlabel?, source?, appearance?Quoted prose
dropcaplines?: 2 | 3 | 4Prose
kbdInline key label

Use :kbd[⌘] for an inline key. Use ordinary > blockquotes for quotations without a notice meaning.

Disclosure and navigation

TagPropsContent
accordiontype?, collapsible?, defaultValue?, appearance?accordion-item children
accordion-itemvalue?, title?, content?Prose
tabslayout?: separate | line, padded?, appearance?tab children
tablabel?, icon?Prose
read-moretitle?, links: json, appearance?No prose slot
toctitle?, depth?, open?No prose slot

Boolean values such as collapsible and padded belong in YAML.

Cards and layout

TagPropsContent
cardscols?: 1 | 2 | 3, appearance?card children
cardtitle?, description?, footer?, to?, target?, icon?, iconColor?, img?, showLinkIcon?, horizontal?, appearance?Prose and named title, description, footer slots
layouttype?column children
columnsize?: sm | md | lgProse
centersize?, max?, type?Prose
content/docs/choices.md
::cards{cols="2"}
:::card{title="Author" icon="lucide:file-pen-line" to="/docs/authoring"}
Write canonical Markdown.
:::
:::card{title="Publish" icon="lucide:rocket" to="/docs/deployment"}
Build reader and agent outputs.
:::
::

Sequences

TagPropsContent
stepsmode?: icons | numbered, appearance?Level-three headings followed by full Markdown
timelineappearance?timeline-item children
timeline-itemdate?, label?, title?, icon?, active?Prose
content/docs/install.md
::steps{mode="numbered"}
### Install

Add the packages.

### Configure

Extend the layer.
::

Put active: true for a timeline item in its YAML block.

Code and files

TagPropsContent
code-groupappearance?Labeled fenced code blocks
code-treedefaultValue?, expandAll?, appearance?Labeled fenced code blocks
collapseappearance?A long prose or code block
filesactive?, annotations?, appearance?One nested Markdown list
content/docs/project-structure.md
::files
---
active: app/app.config.ts
annotations:
  app/app.config.ts: site identity
---
- `app`
  - `app.config.ts`
  - `components`
    - `FeaturePanel.vue`
::

Code fences use only the language, [filename], and line-highlight metadata. Use collapse, code-group, or code-tree for higher-level behavior.

API data

api accepts title?, icon?, method?, path?, groups?, and appearance?. Put the existing groups structure directly in component YAML:

content/docs/api.md
::api{title="figure" icon="lucide:image"}
---
groups:
  - label: Props
    entries:
      - name: src
        annotation: asset
        required: true
        description: Public image reference.
---
::

Images

Author ordinary images with Markdown. Use figure only when the image needs explicit caption, dimensions, bleed, aspect, fit, zoom, or appearance.

TagProps
figuresrc, alt, caption?, width?, height?, bleed?, aspect?, fit?, zoom?, appearance?

Put boolean zoom values in YAML. Without an override, figures follow ginkoDocs.images.zoom.

Quiz

TagPropsContent
quizlabels, title, description, appearance?quiz-question children
quiz-questionquestion, type?, options?, optional interaction labelsExplanation prose
content/docs/check.md
::quiz{title="Check your understanding"}
:::quiz-question
---
question: Which package owns document identity?
options:
  - text: Ginko Content
    correct: true
  - text: Ginko Docs
    correct: false
---
Ginko Content owns canonical document identity and routes.
:::
::

Extend the tag map

Merge ginkoDocsComponentTags and ginkoDocsComponentPolicy from @lupinum/ginko-docs/components when adding an authored component. Register its Vue component globally and add an agent serializer when the default XML-style representation is insufficient.