Simplify your stack and build anything. Or everything.
Build tomorrow’s web with a modern solution you truly own.
Code-based nature means you can build on top of it to power anything.
It’s time to take back your content infrastructure.

UI Components

The @payloadcms/ui package contains the React components used throughout the Payload Admin Panel. You can use these components to build Custom Components that match the surrounding Admin Panel interface and behavior.

Each component guide includes working examples for the selected version of Payload, common props, accessibility guidance, and any providers or setup the component requires.

Components

Using UI components

Inside a Payload Admin Panel Custom Component, import components from @payloadcms/ui:

1
'use client'
2
3
import { Button } from '@payloadcms/ui'
4
5
export function SaveButton() {
6
return <Button>Save changes</Button>
7
}

Some components depend on context provided by the Admin Panel. Each guide calls out those requirements when a component cannot be rendered independently.

Customizing components

The Design tab in each component example provides CSS you can use as a starting point. Add those overrides to the stylesheet loaded by your Admin Panel.

1
/* app/(payload)/custom.css */
2
@layer payload {
3
.btn--style-primary {
4
--color-bg-brand: #6d5dfc;
5
}
6
}

Both frameworks use the same Payload selectors and design tokens. Only the stylesheet entry point differs.

Was this page helpful?

Next

AnimateHeight