Feedback Workflow Component
A versatile interface for user communication, offering options to report issues, provide feedback, request features, or contact support, ensuring user engagement and problem-solving.
Component Visuals




Installation
To install the Quest react-sdk into your project, follow these steps:
Open your terminal/command prompt.
Navigate to your project's root directory using the
cdcommand if you're not already there.Run the following command to install the
quest-sdkpackage using npm:
npm install @questlabs/react-sdkThis command will download and install the package and its dependencies into your project.
Usage
To integrate the Feedback Workflow component into your React application, follow these steps
Import the CSS: In your JavaScript or TypeScript file where you're using the
FeedbackWorkflow, import the CSS styles for the component. This ensures that the component's styling is applied correctly.
import '@questlabs/react-sdk/dist/style.css'Import the FeedbackWorkflowComponent: Import the
Feedback Workflowcomponent from the@questlabs/react-sdkpackage.Import the QuestProvider Component: Import the
QuestProvidercomponent from the@questlabs/react-sdkpackage.
import { QuestProvider, FeedbackWorkflow } from '@questlabs/react-sdk';Pass the Required Props: Pass the required props to the
QuestProvider. The required props areapiKey, andentityId. and required props for theFeedbackWorkflowcomponent areuserId, questId, token
Code & Stpeps
import { QuestProvider, FeedbackWorkflow} from '@questlabs/react-sdk';
import '@questlabs/react-sdk/dist/style.css'
function App() {
return (
<QuestProvider
apiKey="your-apikey"
entityId="your-entity-Id"
apiType= "PRODUCTION" // STAGING
>
<FeedbackWorkflow> </FeedbackWorkflow>
</QuestProvider>
);
}
export default App;
<FeedbackWorkflow
userId=""
questId=""
token=""
uniqueUserId="your-unique-user-id"
>
// children
</FeedbackWorkflow> <FeedbackWorkflow.ThankYou/>
<QuestProvider
apiKey="your-apikey"
entityId="your-entity-Id"
apiType= "PRODUCTION" // STAGING
>
<FeedbackWorkflow
userId=""
questId=""
token=""
uniqueUserId="your-unique-user-id"
>
<FeedbackWorkflow.ThankYou/>
</FeedbackWorkflow>
</QuestProvider>
Example Usage
Here's an example of how to use the FeedbackWorkflowcomponent within your React application
import { QuestProvider, FeedbackWorkflow } from '@questlabs/react-sdk';
import '@questlabs/react-sdk/dist/style.css'
function App() {
return (
<div>
<QuestProvider
apiKey="your-apikey"
entityId="your-entity-Id"
apiType= "PRODUCTION" // STAGING
>
<FeedbackWorkflow
userId=""
questId=""
token=""
uniqueUserId="your-unique-user-id"
>
<Tutorial.ThankYou/>
</FeedbackWorkflow>
</QuestProvider>
</div>
);
}
export default App;import { QuestProvider, TutorialWrapper } from '@questlabs/react-sdk';
import '@questlabs/react-sdk/dist/style.css'
function App() {
return (
<div>
<QuestProvider
apiKey="your api key"
entityId="your entityid"
featureFlags={{}}
themeConfig={{
primaryColor: '',
secondaryColor: '',
borderColor: '',
buttonColor: '',
backgroundColor: 'white',
fontFamily: '',
}}
>
<FeedbackWorkflow
contactUrl="your contect link"
isOpen={true}
questIds={[
'q-general-feedback',
'q-report-a-bug',
'q-request-a-feature',
'q-contact-us',
]}
userId="your user id"
token="your jwt token"
GeneralFeedback={{
heading: 'General Feedback',
description: 'Give general feedback on this page',
formHeading: 'General Feedback',
formDescription: 'Give general feedback on this page',
}}
ReportBug={{
heading: 'Report a bug',
description: "Let us know what's broken",
formHeading: 'Report a bug',
formDescription: 'Describe the bug'
}}
RequestFeature={{
heading: 'Request a feature',
description: 'Tell us how we can imporve',
formHeading: 'Request a Feature',
formDescription: 'Please share your feature'
}}
ContactUs={{
heading: 'Contact us',
description: 'Tell us how we can help',
}}
PrimaryButtonText={"Submit"}
SecondaryButtonText={"Go to home!"}
Headers={[{
heading: "General Feedback",
subHeading: "Welcome back, Please complete your details",
},
{
heading: "Report a bug",
subHeading: "Welcome back, Please complete your details",
},
{
heading: "Request a feature",
subHeading: "Welcome back, Please complete your details",
},
{
heading: "Contact us",
subHeading: "Welcome back, Please complete your details",
}]}
styleConfig={{
Form: {},
Heading: {},
Description: {},
Input: {},
Label: {},
TextArea: {},
PrimaryButton: {},
SecondaryButton: {},
Modal: {},
Topbar: {},
Card: {},
ThanksPopup: {
Style: {},
Heading: "",
Description: "",
ShowFooter: true,
Icon: {}
},
Star: {
Style: {},
PrimaryColor: "",
SecondaryColor: "",
Size: ""
},
listHeading: {},
listDescription: {},
listHover: {
background: "",
iconBackground: "",
iconColor: "",
Heading: "",
Description: "",
IconSize: "",
Icon: {}
},
Footer: {
FooterStyle: {},
FooterText: {},
FooterIcon: {}
}
}}
showFooter={false}
enableVariation={false}
onClose={() => { }}
/>
</QuestProvider>
</div>
);
}
export default App;Props of Feedback Workflow Component
The Feedback Workflow component accepts the following props
userId
string
required
The unique identifier of the user.
questIds
array
required
custom quest ids or q-contact-us, q-report-a-bug, q-general-feedback, q-request-a-feature
token
string
required
An authentication token or API key necessary for accessing tutorial or quest data.
contactUrl
string
optional
The URL for contacting support or administrators.
isOpen
boolean
required
Determines whether the feedback component is open or closed.
onClose
function
optional
A function to handle the closing of the feedback component.
starColor
string
optional
The color of the stars used for rating.
starBorderColor
string
optional
The border color of the stars used for rating.
ratingStyle
string
optional
The style of rating to be used in the feedback component. example:( "Star" or "Numbers" or "Smiles")
uniqueUserId
string
optional
Unique user identifier.
uniqueEmailId
string
optional
Unique Email identifier.
descriptions
string
optional
Descriptions for different feedback options or categories.
iconColor
string
optional
The color of icons within the feedback component.
styleConfig
object
optional
An object containing CSS properties for styling various components within the feedback workflow process, including form, headings, descriptions input, label , text area, modal, footer, and buttons.
Headers
Headers= [{
heading: 'Your Heading'
subHeading : 'Your SubHeading'
}]You can customize the UI with type of styleConfig would be
styleConfig = {{
Form: { },
Heading: { },
Description: { },
Input: { },
Label: { },
TextArea: { },
PrimaryButton: { },
SecondaryButton: { },
Modal: { },
Topbar: { },
Card: { },
ThanksPopup: {
Style: { },
Heading: "",
Description: "",
ShowFooter: true,
Icon: { }
},
Star: {
Style: { },
PrimaryColor: "",
SecondaryColor: "",
Size: ""
},
listHeading: { },
listDescription: { },
listHover: {
background: "",
iconBackground: "",
iconColor: "",
Heading: "",
Description: "",
IconSize: "",
Icon: { }
},
Footer: {
FooterStyle: { },
FooterText: { },
FooterIcon: { }
}
}}Demo
Last updated