StringProperty
@firecms/core / StringProperty
Interface: StringProperty
Section titled “Interface: StringProperty”Defined in: types/properties.ts:355
Extends
Section titled “Extends”BaseProperty<string>
Properties
Section titled “Properties”clearable?
Section titled “clearable?”
optionalclearable:boolean
Defined in: types/properties.ts:425
Add an icon to clear the value and set it to null. Defaults to false
columnWidth?
Section titled “columnWidth?”
optionalcolumnWidth:number
Defined in: types/properties.ts:101
Width in pixels of this column in the collection view. If not set the width is inferred based on the other configurations
Inherited from
Section titled “Inherited from”customProps?
Section titled “customProps?”
optionalcustomProps:any
Defined in: types/properties.ts:148
Additional props that are passed to the components defined in field
or in preview.
Inherited from
Section titled “Inherited from”dataType
Section titled “dataType”dataType:
"string"
Defined in: types/properties.ts:357
Datatype of the property
Overrides
Section titled “Overrides”defaultValue?
Section titled “defaultValue?”
optionaldefaultValue:string|null
Defined in: types/properties.ts:153
This value will be set by default for new entities.
Inherited from
Section titled “Inherited from”description?
Section titled “description?”
optionaldescription:string
Defined in: types/properties.ts:82
Property description, always displayed under the field
Inherited from
Section titled “Inherited from”disabled?
Section titled “disabled?”
optionaldisabled:boolean|PropertyDisabledConfig
Defined in: types/properties.ts:121
Is this field disabled. When set to true, it gets rendered as a disabled field. You can also specify a configuration for defining the behaviour of disabled properties (including custom messages, clear value on disabled or hide the field completely)
Inherited from
Section titled “Inherited from”editable?
Section titled “editable?”
optionaleditable:boolean
Defined in: types/properties.ts:159
Should this property be editable. If set to true, the user will be able to modify the property and save the new config. The saved config will then become the source of truth.
Inherited from
Section titled “Inherited from”email?
Section titled “email?”
optionalemail:boolean
Defined in: types/properties.ts:410
Does this field include an email
enumValues?
Section titled “enumValues?”
optionalenumValues:EnumValues
Defined in: types/properties.ts:383
You can use the enum values providing a map of possible
exclusive values the property can take, mapped to the label that it is
displayed in the dropdown. You can use a simple object with the format
value => label, or with the format value => EnumValueConfig if you
need extra customization, (like disabling specific options or assigning
colors). If you need to ensure the order of the elements, you can pass
a Map instead of a plain object.
Field?
Section titled “Field?”
optionalField:ComponentType<FieldProps<string,any,any>>
Defined in: types/properties.ts:135
If you need to render a custom field, you can create a component that
takes FieldProps as props. You receive the value, a function to
update the value and additional utility props such as if there is an error.
You can customize it by passing custom props that are received
in the component.
Inherited from
Section titled “Inherited from”hideFromCollection?
Section titled “hideFromCollection?”
optionalhideFromCollection:boolean
Defined in: types/properties.ts:106
Do not show this property in the collection view
Inherited from
Section titled “Inherited from”BaseProperty.hideFromCollection
longDescription?
Section titled “longDescription?”
optionallongDescription:string
Defined in: types/properties.ts:95
Longer description of a field, displayed under a popover
Inherited from
Section titled “Inherited from”markdown?
Section titled “markdown?”
optionalmarkdown:boolean
Defined in: types/properties.ts:371
Should this string property be displayed as a markdown field. If true, the field is rendered as a text editors that supports markdown highlight syntax. It also includes a preview of the result.
multiline?
Section titled “multiline?”
optionalmultiline:boolean
Defined in: types/properties.ts:364
Is this string property long enough so it should be displayed in a multiple line field. Defaults to false. If set to true, the number of lines adapts to the content
optionalname:string
Defined in: types/properties.ts:77
Property name (e.g. Product)
Inherited from
Section titled “Inherited from”Preview?
Section titled “Preview?”
optionalPreview:ComponentType<PropertyPreviewProps<string,any>>
Defined in: types/properties.ts:142
Configure how a property is displayed as a preview, e.g. in the collection view. You can customize it by passing custom props that are received in the component.
Inherited from
Section titled “Inherited from”previewAsTag?
Section titled “previewAsTag?”
optionalpreviewAsTag:boolean
Defined in: types/properties.ts:415
Should this string be rendered as a tag instead of just text.
propertyConfig?
Section titled “propertyConfig?”
optionalpropertyConfig:string
Defined in: types/properties.ts:90
You can use this prop to reuse a property that has been defined
in the top level of the CMS in the prop fields.
All the configuration will be taken from the inherited config, and
overwritten by the current property config.
Inherited from
Section titled “Inherited from”readOnly?
Section titled “readOnly?”
optionalreadOnly:boolean
Defined in: types/properties.ts:112
Is this a read only property. When set to true, it gets rendered as a preview.
Inherited from
Section titled “Inherited from”reference?
Section titled “reference?”
optionalreference:ReferenceProperty
Defined in: types/properties.ts:433
You can use this property (a string) to behave as a reference to another
collection. The stored value is the ID of the entity in the
collection, and the path prop is used to
define the collection this reference points to.
storage?
Section titled “storage?”
optionalstorage:StorageConfig
Defined in: types/properties.ts:389
You can specify a Storage configuration. It is used to
indicate that this string refers to a path in your storage provider.
optionalurl:boolean|PreviewType
Defined in: types/properties.ts:405
If the value of this property is a URL, you can set this flag to true to add a link, or one of the supported media types to render a preview
userSelect?
Section titled “userSelect?”
optionaluserSelect:boolean
Defined in: types/properties.ts:399
This property is used to indicate that the string is a user ID, and it will be rendered as a user picker. Note that the user ID needs to be the one used in your authentication provider, e.g. Firebase Auth. You can also use a property builder to specify the user path dynamically based on other values of the entity.
validation?
Section titled “validation?”
optionalvalidation:StringPropertyValidationSchema
Defined in: types/properties.ts:420
Rules for validating this property
Overrides
Section titled “Overrides”widthPercentage?
Section titled “widthPercentage?”
optionalwidthPercentage:number
Defined in: types/properties.ts:165
A number between 0 and 100 that indicates the width of the field in the form view. It defaults to 100, but you can set it to 50 to have two fields in the same row.