diff options
author | 2021-06-27 23:27:12 -0700 | |
---|---|---|
committer | 2021-06-27 23:30:57 -0700 | |
commit | 279a25246260ef95459d29c8029b18bd89adc206 (patch) | |
tree | 7b050d9809a7b031108cf915d29833658278c4e6 /docs/reference/builtin-components.md | |
parent | 11cf22999d9eeb45d25596af481d8bc27fa931ec (diff) | |
download | astro-279a25246260ef95459d29c8029b18bd89adc206.tar.gz astro-279a25246260ef95459d29c8029b18bd89adc206.tar.zst astro-279a25246260ef95459d29c8029b18bd89adc206.zip |
astro-docs sync
Diffstat (limited to 'docs/reference/builtin-components.md')
-rw-r--r-- | docs/reference/builtin-components.md | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/docs/reference/builtin-components.md b/docs/reference/builtin-components.md new file mode 100644 index 000000000..1ea265351 --- /dev/null +++ b/docs/reference/builtin-components.md @@ -0,0 +1,32 @@ +--- +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!). |