Can we utilize default form fields in custom react components?

default discord avatar
last month

I've built a react component that injects at the top of my dashboard and renders some custom charts.

I want to add some <Select /> filters to filter the chart data by and want to use consistent UI components as the rest of the dashboard. However, the form fields seem to be tightly coupled to their collection implementations.

Is there some way to access the lower level components and populate them manually?

Right now i'm trying this:

import { Select } from 'payload/components/forms';

<Select options={[]} />

Can this component be used outside of collections?

ah, I see!


is the underlying component and works as expected.

    Open the post
    Continue the discussion in Discord
    Like what we're doing?
    Star us on GitHub!


    Connect with the Payload Community on Discord



    Can't find what you're looking for?

    Get help straight from the Payload team with an Enterprise License.