Skip to content

Components ​

Components add structured content inside a layout. Use them when ordinary Markdown is not enough.

Choose by content ​

ContentComponents
Claims and formal statementsTheorem, Block, Highlight
Sources and papersCitations, PaperCard
Results and evidenceMetricCard, MetricGrid, EvidenceBlock, ResultTable
Methods and dataEquationBlock, DatasetCard, Steps
Contributions and limitsContributionList, CaveatList
Page compositionColumns, Keywords, ThemePreview

Use a component ​

Components can wrap Markdown content:

markdown
<Theorem type="theorem" title="Pythagorean theorem">

For a right triangle, $a^2 + b^2 = c^2$.

</Theorem>

Or accept data through props:

markdown
<MetricCard label="Accuracy" value="94.7" unit="%" />

Open a component page for its props and complete examples. For shorter authoring syntax, see syntax sugar.

Blank lines around Markdown inside component tags allow Slidev to parse it correctly. Labels such as Paper and Evidence default to English; use each component's label or other text props when you need another language. The research names and numbers in examples are illustrative.