LogoLogo
Quest HomeSign Up
  • 😀Welcome to Quest
  • Getting Started
    • Quest Overview
    • Helpful Resources
    • Quick Start - Build your first component from Figma
    • Quick Start - Build your first component from a Wireframe
    • AI Prompt
  • Fundamentals
    • Customizing & Using the UI Kit
    • Designing Custom Components in Figma
    • Easily Sync Designs without Losing Work
    • Setting Up Props & Bindings
    • Exporting Code
    • Push to your Repository
    • Creating Responsive Components
    • Nesting Components
    • Workspaces & Apps
    • Code & Preview Mode
    • Prototypes/Wireframes
    • Animations - build with React Spring
    • Quest plugin for Figma Dev Mode
    • Publish on Quest to a URL
  • Features
    • Working with Variants & States
    • Naming Conventions
    • Previewing with Custom Fonts
    • Light & Dark Mode
    • Creating a custom Tooltip
    • Creating a Floating Popover
    • Creating a Dialog pop-up
    • Radio Group
    • Using the MUI Data Grid & Table
    • Data & List Bindings
    • Dynamic Bindings
    • Grid
    • File Upload
    • Design System Tab and Theme Import
    • How-to use a Theme in your Application
    • Accessibility Support
    • Design Tips and Tricks
    • Video
    • Lazy Loading
    • Sticky Position
    • Link
    • Custom Breakpoints
    • Min / Max Width
    • Supported Quest UI Kit Components & How-to Make Edits in Figma
    • Supported Chakra Components & How-to Make Edits in Figma
  • Advanced Tutorials
    • Setting up Bindings and Features on the MUI Button
    • Display Repeating Components based on a Dynamic List
    • How-to Pass Values from Parent to Nested Components
    • How-to Invoke a modal Dialog Box from a Button Click
    • How to Setup a popover
  • 🔍Help
    • Product Updates
    • FAQs
    • Plugin Warnings / Alerts
  • 💡Support
    • Why does my design look different in Quest than Figma?
    • Can I keep making changes in Figma without affecting code?
    • What are some best practices?
    • Does Quest support more than Figma and React?
    • How do I manage users?
    • What is the refund process?
    • How do I get in touch with Quest?
    • Do I have to use MUI if I'm using Quest?
Powered by GitBook
On this page

Was this helpful?

  1. Fundamentals

Code & Preview Mode

Previewing & Editing your components & code to see how they will look in a live environment

PreviousWorkspaces & AppsNextPrototypes/Wireframes

Last updated 1 year ago

Was this helpful?

Preview Mode is an easy way to view how your component will look when deployed in a live enviornment. This includes being able to see how featuers such as list or grid will behave or rollover elements to see the tooltips setup. You can also preview bindings to try out different options without editing the bindings you already have set up. In Preview Mode, see the renderedd page with all nested children and have the ability to see all the states for the main component and any nested child component inside of it.

Accessing Code & Preview Mode

When in the Quest Editor, you can access the Code & Preview Mode by pressing on the Code button at the top of the page. By pressing this button, you will launch the Code & Preview Mode replacing the Editor Mode. Depending on how many nested children are inside the component you're viewing the code for, it can affect the load time.

The files that you can edit are the files for the components. In the middle panel, you'll see a preview of the code or image you select. In the screenshot example above, the "HandDraw04.jsx" file is the presentation layer file generated for the layout and styling of the component. Here you can edit the styling but you cannot rearrange the structure or add or remove features. Currently, structure must come from design and features must be added and removed from the Editor mode in Quest. (Ability to fully change is coming soon).

If you've added any functionality with bindings, we'll also generate a hook file for you. This will be a "use" file and in this case the file would be called "useHandDraw04.jsx". Here you can make changes to the file as you see fit. As the initial load into Code & Preview Mode will just show a preview of the component on the right side, if you make changes to the code, you'll need to press the "Run" button at the top to see the changes.

If you have nested components inside the component you imported, you'll also be able to see those files and make edits to them as well.

Previewing with Different Text

When setting up bindings in the Editor, adding a Preview Value to bindings will override any real bindings you have set up. These preview values are what you will see the first time you load Code & Preview Mode but any time you press the "Run" button, they will be overridden to display the real values that are set. In the image example above, the value for this text title is coming from a function, but the Preview Value is simply a text string for testing purposes only. When in Code & Preview Mode for the first time, that value will display instead of the function which may cause it to look blank. This is a good way to quickly try out alternate data than what was in the original design from Figma.

This new Code & Preview Mode replaces the older Preview mode that was represented by a play icon. That mode has merged with this new one.

In this mode you will see 3 panels. The furtherest panel to the left is your App structure. Here you can see all the files that will be generated for the App. It will open the component file for the presentation layer to start but you can navigate and explore the other files. These files are all read-only in this mode but you can always or to make changes to anything you'd like.

download the code
push to GitHub
Code and Preview Mode - Quest AI
Preview Value for Preview Mode