# Incorrect RTLabelNode type

**URL:** <https://community.prismic.io/t/incorrect-rtlabelnode-type/20121>\
**Category:** Developing with Prismic\
**Tags:** typescript, rich-text\
**Created:** [February 23, 2026, 9:39am UTC](https://community.prismic.io/t/incorrect-rtlabelnode-type/20121 "2026-02-23T09:39:05Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![starsky](https://dub1.discourse-cdn.com/flex013/user_avatar/community.prismic.io/starsky/32/8703_2.png) [@starsky](https://community.prismic.io/u/starsky)\
**Post date:** [February 23, 2026, 9:39am UTC](https://community.prismic.io/t/incorrect-rtlabelnode-type/20121/1 "2026-02-23T09:39:05Z")

</div>

## Describe your question/issue in detail

I am trying to use a custom label to render a third party widget within a RichTextField. This works great but I get a type error when trying to access `props.node.text`. In my testing this has always been present and is required for my component.

Full snippet

`const props = defineProps(getRichTextComponentProps('label'))`  
`const rawWidgetText: string = props.node.text`

### Impacted feature

Custom labels for RichTextFields

### What steps have you taken to resolve this issue already?

N/A

### Errors

Property 'text' does not exist on type 'RTLabelNode'.

### Your Role

Web Developer

### Steps to reproduce

Attempt to access `defineProps(getRichTextComponentProps('label')).node.text` in a typescript project.

---

<div class="post-metadata">

**Author:** ![lihbr](https://dub1.discourse-cdn.com/flex013/user_avatar/community.prismic.io/lihbr/32/7409_2.png) [@lihbr](https://community.prismic.io/u/lihbr)\
**Post date:** [March 2, 2026, 3:21am UTC](https://community.prismic.io/t/incorrect-rtlabelnode-type/20121/2 "2026-03-02T03:21:51Z")

</div>

Hi @starsky, sorry for the delay getting back to you!

I confirmed this property is present, but it's hidden because it's part of our internal rich-text serialization mechanism. That being said, it should be safe-ish to use. You should be able to get proper typing this way:

```ts
import type { RTLabelNode } from '@prismicio/client'

defineProps<{ node: RTLabelNode & { text?: string } }>()

```

Can you tell us more about what you need to use the text property for so we can better understand your use case and why `<slot>` didn't work for you?

---

<div class="post-metadata">

**Author:** ![starsky](https://dub1.discourse-cdn.com/flex013/user_avatar/community.prismic.io/starsky/32/8703_2.png) [@starsky](https://community.prismic.io/u/starsky)\
**Post date:** [March 2, 2026, 10:31am UTC](https://community.prismic.io/t/incorrect-rtlabelnode-type/20121/3 "2026-03-02T10:31:44Z")

</div>

Hi @lihbr

Thanks for the reply!

We wanted a way for content users to input an id to be used for a GiveButter widget. GiveButter use a custom tag like this (simplified) `<givebutter-widget :id="props.node.text"></givebutter-widget>`.  
So we thought a nice way to do this would be to use a ‘givebutter’ label which renders the id appropriately.

---

<div class="post-metadata">

**Author:** ![lihbr](https://dub1.discourse-cdn.com/flex013/user_avatar/community.prismic.io/lihbr/32/7409_2.png) [@lihbr](https://community.prismic.io/u/lihbr)\
**Post date:** [March 2, 2026, 11:03am UTC](https://community.prismic.io/t/incorrect-rtlabelnode-type/20121/4 "2026-03-02T11:03:02Z")

</div>

That's really clever, love it!

I'll see what we can do regarding the rich text typing with my colleagues. Also, simplifying that kind of workflow is definitely something we want to work on so hopefully we'll have a more integrated way of enabling that kind of widgets within rich text fields 🙂

---

<div class="post-metadata">

**Author:** ![starsky](https://dub1.discourse-cdn.com/flex013/user_avatar/community.prismic.io/starsky/32/8703_2.png) [@starsky](https://community.prismic.io/u/starsky)\
**Post date:** [March 2, 2026, 11:17am UTC](https://community.prismic.io/t/incorrect-rtlabelnode-type/20121/5 "2026-03-02T11:17:02Z")

</div>

Thank you! Something that would be really helpful is being able to create this sort of ‘widget’ label globally for all RichTextFields. I understand why this is difficult with the current architecture of RichTextFields but maybe something to consider? :)
