blob: 9465a3428c825d267b452aa95f594930e5c1cf86 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
|
---
layout: ~/layouts/MainLayout.astro
title: Built-In Components
---
Astro includes several builtin components for you to use in your projects. All builtin components are available via `import {} from 'astro/components';`.
## `<Markdown />`
```astro
---
import { Markdown } from 'astro/components';
---
<Markdown>
# Markdown syntax is now supported! **Yay!**
</Markdown>
```
See our [Markdown Guide](/guides/markdown-content) for more info.
<!-- TODO: We should move some of the specific component info here. -->
## `<Prism />`
```astro
---
import { Prism } from 'astro/components';
---
<Prism code={`const foo = 'bar';`} />
```
This component provides syntax highlighting for code blocks. Since this never changes in the client it makes sense to use an Astro component (it's equally reasonable to use a framework component for this kind of thing; Astro is server-only by default for all frameworks!).
## `<Debug />`
```astro
---
import { Debug } from 'astro/debug';
const serverObject = {
a: 0,
b: "string",
c: {
nested: "object"
}
}
---
<Debug {serverObject} />
```
This component provides a way to inspect values on the clientside, without any JavaScript.
|