# How do i use the Rich text/html prop?

**URL:** <https://forum.builder.io/t/how-do-i-use-the-rich-text-html-prop/4383>\
**Category:** Technical Questions\
**Created:** [October 29, 2023, 12:44pm UTC](https://forum.builder.io/t/how-do-i-use-the-rich-text-html-prop/4383 "2023-10-29T12:44:15Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![neri](https://avatars.discourse-cdn.com/v4/letter/n/da6949/32.png) [@neri](https://forum.builder.io/u/neri)\
**Post date:** [October 29, 2023, 12:44pm UTC](https://forum.builder.io/t/how-do-i-use-the-rich-text-html-prop/4383/1 "2023-10-29T12:44:16Z")

</div>

I have this component:

```auto
export function Text({ label }) {
  return <p>{label}</p>;
}

Builder.registerComponent(Text, {
  name: 'Text',
  inputs: [
    {
      name: 'text',
      type: 'html',
    },
  ],
});

```

The html is displayed as it is, with the tags.  
how do i render the html/richtext as text?

---

<div class="post-metadata">

**Author:** ![JonathanLand](https://avatars.discourse-cdn.com/v4/letter/j/c57346/32.png) [@JonathanLand](https://forum.builder.io/u/JonathanLand)\
**Post date:** [October 29, 2023, 1:08pm UTC](https://forum.builder.io/t/how-do-i-use-the-rich-text-html-prop/4383/2 "2023-10-29T13:08:29Z")

</div>

If you’re using React you need to set the html, e.g.:

```auto
export function Text({ label }) {
  return <p dangerouslySetInnerHTML={{ __html: label }} />;
}

```

See here: [https://react.dev/reference/react-dom/components/common#dangerously-setting-the-inner-html](https://react.dev/reference/react-dom/components/common#dangerously-setting-the-inner-html)
