A collection of ready-made field helpers that you import individually and spread into a collection's fields array. Each field takes overrides for the underlying Payload field plus its own config. Fields reuse Payload admin styles and CSS variables, and some require installing extra dependencies yourself.
A Payload plugin that aims to provide improved fields for the admin panel
Installation
npm i @nouance/payload-better-fields-plugin294
Stars
9
Forks
27
Open Issues
1 years ago
Last Updated
3.7k
Weekly Downloads
v2.0.2
npm Version
176.9 KB
Unpacked Size
0
Dependencies
294+3 since Sep 6
| Date | Stars |
|---|---|
| Dec 5, 2026 | 294 |
| Dec 4, 2026 | 294 |
| Dec 3, 2026 | 294 |
| Dec 2, 2026 | 294 |
| Dec 1, 2026 | 294 |
| Nov 30, 2026 | 294 |
| Nov 29, 2026 | 294 |
| Nov 28, 2026 | 294 |
| Nov 27, 2026 | 294 |
| Nov 26, 2026 | 294 |
| Nov 25, 2026 | 294 |
| Nov 24, 2026 | 294 |
| Nov 23, 2026 | 294 |
| Nov 22, 2026 | 294 |
| Nov 21, 2026 | 294 |
| Nov 20, 2026 | 294 |
| Nov 19, 2026 | 294 |
| Nov 18, 2026 | 294 |
| Nov 17, 2026 | 294 |
| Nov 16, 2026 | 295 |
| Nov 15, 2026 | 295 |
| Nov 14, 2026 | 295 |
| Nov 13, 2026 | 295 |
| Nov 12, 2026 | 295 |
| Nov 11, 2026 | 295 |
| Nov 10, 2026 | 295 |
| Nov 9, 2026 | 295 |
| Nov 8, 2026 | 295 |
| Nov 7, 2026 | 295 |
| Nov 6, 2026 | 295 |
| Nov 5, 2026 | 295 |
| Nov 4, 2026 | 294 |
| Nov 3, 2026 | 294 |
| Nov 2, 2026 | 294 |
| Nov 1, 2026 | 294 |
| Oct 31, 2026 | 294 |
| Oct 30, 2026 | 294 |
| Oct 29, 2026 | 294 |
| Oct 28, 2026 | 294 |
| Oct 27, 2026 | 294 |
| Oct 26, 2026 | 294 |
| Oct 25, 2026 | 294 |
| Oct 24, 2026 | 294 |
| Oct 23, 2026 | 294 |
| Oct 22, 2026 | 294 |
| Oct 21, 2026 | 293 |
| Oct 20, 2026 | 293 |
| Oct 19, 2026 | 293 |
| Oct 18, 2026 | 293 |
| Oct 17, 2026 | 293 |
| Oct 16, 2026 | 293 |
| Oct 15, 2026 | 293 |
| Oct 14, 2026 | 293 |
| Oct 13, 2026 | 293 |
| Oct 12, 2026 | 293 |
| Oct 11, 2026 | 293 |
| Oct 10, 2026 | 293 |
| Oct 9, 2026 | 293 |
| Oct 8, 2026 | 293 |
| Oct 7, 2026 | 293 |
| Oct 6, 2026 | 293 |
| Oct 5, 2026 | 293 |
| Oct 4, 2026 | 293 |
| Oct 3, 2026 | 292 |
| Oct 2, 2026 | 292 |
| Oct 1, 2026 | 292 |
| Sep 30, 2026 | 292 |
| Sep 29, 2026 | 292 |
| Sep 28, 2026 | 292 |
| Sep 27, 2026 | 292 |
| Sep 26, 2026 | 292 |
| Sep 25, 2026 | 292 |
| Sep 24, 2026 | 292 |
| Sep 23, 2026 | 292 |
| Sep 22, 2026 | 292 |
| Sep 21, 2026 | 292 |
| Sep 20, 2026 | 292 |
| Sep 19, 2026 | 292 |
| Sep 18, 2026 | 292 |
| Sep 17, 2026 | 292 |
| Sep 16, 2026 | 292 |
| Sep 15, 2026 | 292 |
| Sep 14, 2026 | 292 |
| Sep 13, 2026 | 291 |
| Sep 12, 2026 | 291 |
| Sep 11, 2026 | 291 |
| Sep 10, 2026 | 291 |
| Sep 9, 2026 | 291 |
| Sep 8, 2026 | 291 |
| Sep 7, 2026 | 291 |
| Sep 6, 2026 | 291 |
3.2K−3.2K since Sep 6
| Date | Weekly downloads |
|---|---|
| Dec 5, 2026 | 3,167 |
| Dec 4, 2026 | 3,304 |
| Dec 3, 2026 | 3,252 |
| Dec 2, 2026 | 2,923 |
| Dec 1, 2026 | 3,004 |
| Nov 30, 2026 | 3,062 |
| Nov 29, 2026 | 3,505 |
| Nov 28, 2026 | 3,774 |
| Nov 27, 2026 | 3,648 |
| Nov 26, 2026 | 3,576 |
| Nov 25, 2026 | 3,582 |
| Nov 24, 2026 | 3,441 |
| Nov 23, 2026 | 3,365 |
| Nov 22, 2026 | 3,181 |
| Nov 21, 2026 | 3,178 |
| Nov 20, 2026 | 2,912 |
| Nov 19, 2026 | 3,124 |
| Nov 18, 2026 | 4,161 |
| Nov 17, 2026 | 4,357 |
| Nov 16, 2026 | 4,596 |
| Nov 15, 2026 | 5,514 |
| Nov 14, 2026 | 6,580 |
| Nov 13, 2026 | 7,803 |
| Nov 12, 2026 | 8,220 |
| Nov 11, 2026 | 7,381 |
| Nov 10, 2026 | 7,244 |
| Nov 9, 2026 | 7,017 |
| Nov 8, 2026 | 6,270 |
| Nov 7, 2026 | 5,424 |
| Nov 6, 2026 | 4,600 |
| Nov 5, 2026 | 4,444 |
| Nov 4, 2026 | 4,488 |
| Nov 3, 2026 | 4,421 |
| Nov 2, 2026 | 4,466 |
| Nov 1, 2026 | 4,668 |
| Oct 31, 2026 | 4,553 |
| Oct 30, 2026 | 4,477 |
| Oct 29, 2026 | 3,512 |
| Oct 28, 2026 | 2,589 |
| Oct 27, 2026 | 2,604 |
| Oct 26, 2026 | 2,681 |
| Oct 25, 2026 | 2,490 |
| Oct 24, 2026 | 2,851 |
| Oct 23, 2026 | 2,052 |
| Oct 22, 2026 | 3,123 |
| Oct 21, 2026 | 3,797 |
| Oct 20, 2026 | 3,796 |
| Oct 19, 2026 | 3,672 |
| Oct 18, 2026 | 3,749 |
| Oct 17, 2026 | 3,411 |
| Oct 16, 2026 | 4,026 |
| Oct 15, 2026 | 3,892 |
| Oct 14, 2026 | 4,163 |
| Oct 13, 2026 | 4,211 |
| Oct 12, 2026 | 4,201 |
| Oct 11, 2026 | 4,102 |
| Oct 10, 2026 | 3,990 |
| Oct 9, 2026 | 4,199 |
| Oct 8, 2026 | 3,906 |
| Oct 7, 2026 | 3,756 |
| Oct 6, 2026 | 3,770 |
| Oct 5, 2026 | 3,870 |
| Oct 4, 2026 | 3,774 |
| Oct 3, 2026 | 3,663 |
| Oct 2, 2026 | 3,419 |
| Oct 1, 2026 | 3,429 |
| Sep 30, 2026 | 3,424 |
| Sep 29, 2026 | 3,498 |
| Sep 28, 2026 | 3,381 |
| Sep 27, 2026 | 3,513 |
| Sep 26, 2026 | 4,570 |
| Sep 25, 2026 | 5,654 |
| Sep 24, 2026 | 6,965 |
| Sep 23, 2026 | 6,989 |
| Sep 22, 2026 | 6,982 |
| Sep 21, 2026 | 7,091 |
| Sep 20, 2026 | 13,004 |
| Sep 19, 2026 | 14,621 |
| Sep 18, 2026 | 14,077 |
| Sep 17, 2026 | 13,168 |
| Sep 16, 2026 | 13,039 |
| Sep 15, 2026 | 13,978 |
| Sep 14, 2026 | 14,410 |
| Sep 13, 2026 | 8,588 |
| Sep 12, 2026 | 6,284 |
| Sep 11, 2026 | 6,252 |
| Sep 10, 2026 | 6,081 |
| Sep 9, 2026 | 6,294 |
| Sep 8, 2026 | 5,520 |
| Sep 7, 2026 | 5,701 |
| Sep 6, 2026 | 6,353 |
Each point is npm's rolling 7-day download count.
Health Score
Composite score based on GitHub activity, stars, npm downloads, publish recency, dependency count, and package size.
Badge for your README
[](https://payloaddirectory.dev/plugins/686312872-root)<a href="https://payloaddirectory.dev/plugins/686312872-root"><img src="https://payloaddirectory.dev/badge/686312872-root.svg" alt="Payload Directory"></a>README
This plugin aims to provide you with very specific and improved fields for the admin panel.
We've tried to keep styling as consistent as possible with the existing admin UI, however if there are any issues please report them!
Every field will come with its own usage instructions and structure. These are subject to change!
All fields have been changed for how they are imported. You will also need to install dependencies directly yourself. This should streamline the bundle size a lot especially for unused fields.
| Payload | Better fields |
|---|---|
| 1.x | < 1.0 |
| 2.x | > 1.0 |
| 3.x | > 2.0 |
pnpm add @nouance/payload-better-fields-plugin
# OR
npm i @nouance/payload-better-fields-plugin
We've tried to re-use the internal components of Payload as much as possible. Where we can't we will re-use the CSS variables used in the core theme to ensure as much compatibility with user customisations.
If you want to further customise the CSS of these components, every component comes with a unique class wrapper in the format of bf<field-name>Wrapper, eg bfPatternFieldWrapper, to help you target these inputs consistently.
import { CollectionConfig } from 'payload/types'
import { SlugField } from '@nouance/payload-better-fields-plugin/Slug'
const Examples: CollectionConfig = {
slug: 'examples',
admin: {
useAsTitle: 'title',
},
fields: [
{
name: 'title',
type: 'text',
},
...SlugField(
{
name: 'slug',
admin: {
position: 'sidebar',
},
},
{
useFields: ['title', 'subtitle'],
},
),
],
}
The SlugField accepts the following parameters
fieldsToUse - string defaults to 'title'
overrides
slugOverrides - TextField required Textfield overrides
checkboxOverrides - CheckboxField | Checkbox field overrides
Here is a more full example:
...SlugField('title'),
index and unique are set to true by default
import { CollectionConfig } from 'payload/types'
import { ComboField } from '@nouance/payload-better-fields-plugin/Combo'
const Examples: CollectionConfig = {
slug: 'examples',
admin: {
useAsTitle: 'fullName',
},
fields: [
{
type: 'row',
fields: [
{
name: 'firstName',
type: 'text',
},
{
name: 'lastName',
type: 'text',
},
],
},
...ComboField(['firstName', 'lastName'], { name: 'fullName' }),
],
}
The ComboField accepts the following parameters
overrides - TextField required for name attribute
fieldToUse - string[] required
options
separator - string defaults to ' '
initial - string The starting string value before all fields are concatenated
Removed options:
callback - (value: string) => string You can apply a callback to modify each field value if you want to preprocess themsource | react-number-format NumericFormat
import { CollectionConfig } from 'payload/types'
import { NumberField } from '@nouance/payload-better-fields-plugin/Number'
const Examples: CollectionConfig = {
slug: 'examples',
admin: {
useAsTitle: 'fullName',
},
fields: [
{
name: 'title',
type: 'text',
},
...NumberField(
{
name: 'price',
required: true,
},
{
prefix: '$ ',
suffix: ' %',
thousandSeparator: ',',
decimalScale: 2,
fixedDecimalScale: true,
},
),
],
}
The NumberField accepts the following parameters
overrides - NumberField required for name attribute
format - NumericFormatProps required, accepts props for NumericFormat
callback - you can override the internal callback on the value, the value will be a string so you need to handle the conversion to an int or float yourself via parseFloat// example
callback: (value) => parseFloat(value) + 20,
source | react-number-format PatternFormat
import { CollectionConfig } from 'payload/types'
import { PatternField } from '@nouance/payload-better-fields-plugin/Pattern'
const Examples: CollectionConfig = {
slug: 'examples',
admin: {
useAsTitle: 'fullName',
},
fields: [
{
name: 'title',
type: 'text',
},
...PatternField(
{
name: 'telephone',
type: 'text',
required: false,
admin: {
placeholder: '% 20',
},
},
{
format: '+1 (###) #### ###',
prefix: '% ',
allowEmptyFormatting: true,
mask: '_',
},
),
],
}
The PatternField accepts the following parameters
overrides - TextField required for name attribute
format - PatternFormatProps required, accepts props for PatternFormat
format required, input for the pattern to be applied
callback - you can override the internal callback on the value, the value will be a string so you need to handle the conversion to an int or float yourself via parseFloat
// example
callback: (value) => value + 'ID',
We recommend using a text field in Payload.
import { CollectionConfig } from 'payload/types'
import { RangeField } from '@nouance/payload-better-fields-plugin/Range'
const Examples: CollectionConfig = {
slug: 'examples',
admin: {
useAsTitle: 'title',
},
fields: [
{
name: 'title',
type: 'text',
},
...RangeField(
{
name: 'groups',
},
{ min: 5, max: 200, step: 5 },
),
],
}
export default Examples
The RangeField accepts the following parameters
overrides - NumberField required for name attribute
config - required
min - number defaults to 1
max - number defaults to 100
step - number defaults to 1
showPreview - boolean defaults to false, shows a preview box of the underlying selected value, n/a for null
markers - NumberMarker[] array of markers to be visually set, accepts an optional label
{ value: number, label?: string}[]import { CollectionConfig } from 'payload/types'
import { ColourTextField } from '@nouance/payload-better-fields-plugin/ColourText'
const Examples: CollectionConfig = {
slug: 'examples',
admin: {
useAsTitle: 'title',
},
fields: [
{
name: 'title',
type: 'text',
},
...ColourTextField({
name: 'colour',
}),
],
}
export default Examples
The ColourTextField accepts the following parameters
overrides - TextField required for name attributesource | react-phone-number-input
import { CollectionConfig } from 'payload/types'
import { TelephoneField } from '@nouance/payload-better-fields-plugin/Telephone'
const Examples: CollectionConfig = {
slug: 'examples',
admin: {
useAsTitle: 'title',
},
fields: [
{
name: 'title',
type: 'text',
},
...TelephoneField({
name: 'telephone',
admin: {
placeholder: '+1 2133 734 253',
},
}),
],
}
export default Examples
The TelephoneField accepts the following parameters
overrides - TextField required for name attribute
config - Config optional, allows for overriding attributes in the phone field
international defaults to true | Forces international formatting
defaultCountry accepts a 2-letter country code eg. 'US' | If defaultCountry is specified then the phone number can be input both in "international" format and "national" format
country accepts a 2-letter country code eg. 'US' | If country is specified then the phone number can only be input in "national" (not "international") format
initialValueFormat If an initial value is passed, and initialValueFormat is "national", then the initial value is formatted in national format
withCountryCallingCode If country is specified and international property is true then the phone number can only be input in "international" format for that country
countryCallingCodeEditable
smartCaret When the user attempts to insert a digit somewhere in the middle of a phone number, the caret position is moved right before the next available digit skipping any punctuation in between
useNationalFormatForDefaultCountryValue When defaultCountry is defined and the initial value corresponds to defaultCountry, then the value will be formatted as a national phone number by default
countrySelectProps
unicodeFlags defaults to false | Set to true to render Unicode flag icons instead of SVG imagesimport { CollectionConfig } from 'payload/types'
import { AlertBoxField } from '@nouance/payload-better-fields-plugin/AlertBox'
const Examples: CollectionConfig = {
slug: 'examples',
admin: {
useAsTitle: 'title',
},
fields: [
{
name: 'title',
type: 'text',
},
...AlertBoxField(
{
name: 'alert',
},
{
type: 'info',
message: 'Please be aware that the title is required for the mobile app.',
},
),
],
}
export default Examples
The AlertBoxField accepts the following parameters
overrides - UIField required for name attribute
config - Config required
type - a selection of info | alert | error which come with different styles
message - required string
className - optional string to help you style individual alerts better
icon - optional, default is enabled
enable - boolean, turn off the icon
Element - React component to override the provided icon
If you want to make this field appear conditionally, you should use the field's admin conditional config as provided by Payload.
import { CollectionConfig } from 'payload/types'
import { ColourPickerField } from '@nouance/payload-better-fields-plugin/ColourPicker'
const Examples: CollectionConfig = {
slug: 'examples',
admin: {
useAsTitle: 'title',
},
fields: [
{
name: 'title',
type: 'text',
},
...ColourPickerField(
{
name: 'backgroundColour',
required: true,
},
{
type: 'hslA',
},
),
],
}
export default Examples
The ColourPickerField accepts the following parameters
overrides - TextField required for name attribute
config - Config required
type - defaults to hex, a selection of hex | hexA | rgb | rgbA | hsl | hslA
expanded - optional boolean, controls if the selector is visible by default
showPreview - optional boolean
The goal of this field is to help with management of timezones.
import { CollectionConfig } from 'payload/types'
import { DateField } from '@nouance/payload-better-fields-plugin/Date'
const Examples: CollectionConfig = {
slug: 'examples',
admin: {
useAsTitle: 'title',
},
fields: [
{
name: 'title',
type: 'text',
},
...DateField({
name: 'date',
admin: {
date: {
pickerAppearance: 'dayAndTime',
},
},
}),
],
}
export default Examples
The DateField accepts the following parameters
overrides - DateField required for name attribute
timezone - Timezone optional
enabled - defaults to true
timezones - optional list of timezones to customise available options
overrides - SelectField required for name attribute
For development purposes, there is a full working example of how this plugin might be used in the dev directory of this repo.
git clone [email protected]:NouanceLabs/payload-better-fields-plugin.git \
cd payload-better-fields-plugin && pnpm \
cd demo && pnpm \
cp .env.example .env \
vim .env \ # add your payload details
pnpm dev
Thanks to the following people for contributing code to this plugin
payload fields
Field factories and admin components for Unicode slugs, Jalali dates, integer money and Iranian identity data
75230/wk3v3
payload phone number plugin
Phone number field with country selection, as-you-type formatting and validation in the Payload admin
69837/wk17v3
payload mask plugin
Input masking for Payload text fields using IMask
359/wk17v1 v2
heading field
Field wrapper that lets editors choose the h1–h6 tag for text, textarea, or rich text headings
62156/wk16v3
payload google map autocomplete places
Google Places autocomplete field that stores a picked location and its coordinates
5542/wk28v2
payload color picker field
A color picker field for Payload collections that stores HEX color values
531.6k/wk41v3