32 lines
920 B
Markdown
32 lines
920 B
Markdown
---
|
|
layout: ~/layouts/Main.astro
|
|
title: Astro Builtin 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](/docs/guides/markdown-content.md) 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!).
|