#raw text component
1 messages · Page 1 of 1 (latest)
Hi @feral tusk. I'm kapa.ai, your friendly support bot. I will try to answer your question by searching through the knowledge base. :wave:
Yes, it is possible for an Astro component to render raw text. You can use the is:raw directive to instruct the Astro compiler to treat any children of that element as text. This means that all special Astro templating syntax will be ignored inside of this component. Here is an example:
---
import MyComponent from '../components/MyComponent.astro';
---
<MyComponent is:raw>hello</MyComponent>
In this example, the text "hello" will be treated as raw text and will be rendered as is, without any tags.