Skip to Content
Strapi Page Builder 1.0 is now available 🎉

Color

import { ComponentConfig } from "@wecre8websites/strapi-page-builder-react"; export interface MyComponentProps { myFieldName: string; } export const MyComponentConfig: Omit<ComponentConfig<MyComponentProps, MyComponentProps>, "type"> = { fields: { myFieldName: { type: "color", label: "My Field Name", }, }, defaultProps: { myFieldName: "#000000", }, label: "My Component", render: (props) => { return <div style={{ background: props.myFieldName }} /> } }

Field Definition

ParameterDescriptionRequired
typetexttrue
labelThe label for the field in the editor.false

Field Appearance


Strapi Page Builder
Last updated on