Question T15129
Visible to All Users

Custom position logo

created a year ago

Hi,
I would like to know, if it's possible to change the logo's position: left, right, top, bottom. In previous versions used to be Logo Position Property.

Clipboard-File-1.png

And also, there is a size limit (MB) for upload the logo??

Answers approved by surveyjs Support

created a year ago

Hello,
Thank you for reaching out to us. The logoPosition property is not available in the UI to adhere to the DefaultV2 theme guidelines, which set that the logo position must always be on the right. However, we are currently enhancing our Theme Editor, which allows users to create custom themes. This means that you may need to change the position of a survey logo. The updated Header section within the Theme Editor will enable users to customize the header and specify the logo's position.
Please stay updated with our Release Notes to ensure you don't miss any updates.

For now, you can use the following code to programmatically add a custom Logo mode property that specifies the survey.logoPosition property:

JavaScript
import { Serializer } from "survey-core"; const logoPositionProp = Serializer.addProperty("survey", { name: "logoMode", choices: ["left", "right"], onSetValue(surveyEl, value) { surveyEl.setPropertyValue("logoPosition", value); surveyEl.setPropertyValue("logoMode", value); }, isSerializable: false }); logoPositionProp.category = "logo"; logoPositionProp.visible = true;

You can find a live example in this CodeSandbox. The custom Logo mode property will appear within the Logo property grid category.

I hope this example helps.

If you have any questions or require further assistance, please don't hesitate to contact us. We are here to assist you.

Thanks

    Comments (1)

      And also, there is a size limit (MB) for upload the logo??

      A Survey Creator doesn't limit the uploaded logo size. However, you can handle image uploads from code and apply a size limit. For more information, please refer to the following demo: Manage Image Uploads.

      Thanks