# Customizing RichText Components and PrismicNextLink

**URL:** <https://community.prismic.io/t/customizing-richtext-components-and-prismicnextlink/13439>\
**Category:** Developing with Prismic\
**Tags:** nextjs\
**Created:** [June 14, 2023, 7:47am UTC](https://community.prismic.io/t/customizing-richtext-components-and-prismicnextlink/13439 "2023-06-14T07:47:51Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![andre.lergier](https://dub1.discourse-cdn.com/flex013/user_avatar/community.prismic.io/andre.lergier/32/6490_2.png) [@andre.lergier](https://community.prismic.io/u/andre.lergier)\
**Post date:** [June 14, 2023, 7:47am UTC](https://community.prismic.io/t/customizing-richtext-components-and-prismicnextlink/13439/1 "2023-06-14T07:47:51Z")

</div>

I have a question regarding customization of Prismic components.

A few month ago the starter tutorial for Next.js suggested to use the `<PrismicProvider>` component.  
This gave me the option to customize the `<PrismicLink>` component and set custom components which are used by `<PrismicRichText>` all over the application.

```tsx
<PrismicProvider
  internalLinkComponent={(props) => <Link {...props} />}
  externalLinkComponent={(props) => <Link {...props} external />}
  richTextComponents={{
    heading1: ({ children }) => <Title level="h1">{children}</Title>,
    heading2: ({ children }) => <Title level="h2">{children}</Title>,
    heading3: ({ children }) => <Title level="h3">{children}</Title>,
    heading4: ({ children }) => <Title level="h4">{children}</Title>,
    heading5: ({ children }) => <Title level="h5">{children}</Title>,
    heading6: ({ children }) => <Title level="h6">{children}</Title>,
    paragraph: ({ children }) => <Text>{children}</Text>,
    strong: ({ children }) => <TextStrong>{children}</TextStrong>,
  }}>

```

As [mentioned now](https://prismic.io/docs/technical-reference/prismicio-react?version=v2#prismicprovider), it's no longer recommended to use the` <PrismicProvider>` component:

> **We no longer recommend using `<PrismicProvider>`**  
> We recommend creating your own wrapper components to configure components globally rather than using `<PrismicProvider>`.

So, how am I able to customize the components, that are used in my `<PrismicRichText>` globally?

And how can I customize the components, that are used by the newly implemented [`<PrismicNextLink>`](https://prismic.io/docs/technical-reference/prismicio-next#prismicnextlink) component?

I would highly appreciate those possibilities.

---

<div class="post-metadata">

**Author:** ![Priyanka](https://dub1.discourse-cdn.com/flex013/user_avatar/community.prismic.io/priyanka/32/3223_2.png) [@Priyanka](https://community.prismic.io/u/Priyanka)\
**Post date:** [June 14, 2023, 1:47pm UTC](https://community.prismic.io/t/customizing-richtext-components-and-prismicnextlink/13439/3 "2023-06-14T13:47:04Z")

</div>

Hello Andre,

Thanks for reaching out to us.

Indeed, We don't recommend `<PrismicProvider>` anymore because `<PrismicProvider>` isn't compatible with React server components, and React server components are far more performant.

You can create your own wrapper component to do this. The [React technical reference](https://prismic.io/docs/technical-reference/prismicio-react) has code snippets for this.  
For `PrismicRichText,` the paragraph starting: To globally customize `<PrismicRichText>.`  
For `PrismicLink,` the paragraph starting: To globally customize `<PrismicLink>.`

I hope it's clear to you. Let me know if you need any assistance.

Thanks,  
Priyanka

---

<div class="post-metadata">

**Author:** ![andre.lergier](https://dub1.discourse-cdn.com/flex013/user_avatar/community.prismic.io/andre.lergier/32/6490_2.png) [@andre.lergier](https://community.prismic.io/u/andre.lergier)\
**Post date:** [June 14, 2023, 2:00pm UTC](https://community.prismic.io/t/customizing-richtext-components-and-prismicnextlink/13439/4 "2023-06-14T14:00:42Z")

</div>

Thanks for your reply, @Priyanka!

I'm sorry, I didn't see that part of the documentation and somehow I didn't think as far on my own... 🤦‍♂️  
I'll update my applications. 🙂

---

<div class="post-metadata">

**Author:** ![Priyanka](https://dub1.discourse-cdn.com/flex013/user_avatar/community.prismic.io/priyanka/32/3223_2.png) [@Priyanka](https://community.prismic.io/u/Priyanka)\
**Post date:** [June 14, 2023, 2:49pm UTC](https://community.prismic.io/t/customizing-richtext-components-and-prismicnextlink/13439/5 "2023-06-14T14:49:00Z")

</div>

No issues, @andre.lergier. I am happy to answer you. Let us know if you need any assitance.
