Skip to Content
Docs
Your code in Dessn

Sample data and states

The sample data your pages run on, how to change it, and how to show a page in another state or as another user.

Dessn runs your app without your backend. During setup it gives your app sample data that fits your code: the API's answers, a signed-in user, feature flags and storage. That's why every page opens with something on it, and why what you do on a file doesn't touch your own backend's data.

When you press Play and send a form, add a row or delete one, the change happens in the sample data, so the next page shows it, as it would in your app.

Sample data lives in Dessn. It's never added to your repository.

Change the data or the state

Ask for it in words, on the frame you want:

  • "Show this table with 200 rows and a long customer name."
  • "Make the empty state of Projects."
  • "Show checkout when the card is declined."
  • "Show Settings as a viewer, not an admin."

Select the frame and ask Petal or the design agent, or ask your coding agent. Each new state goes on its own frame, so the original stays as it was.

Save the state you're in

Click through a frame in Play until it shows what you want, then use the frame bar under it:

  • Extract current state adds a frame of that moment beside the original.
  • Record flow adds a frame for each step you take, until you press Stop.

In full screen, the arrows at the bottom step through a frame's saved states.

Different users

If your code shows different things to different kinds of user (an admin and a member, signed in and signed out, Free and paid), setup makes a frame for each, and a chip in the frame's header names the user it shows.

Titles set in Kalice, Claude Type, designed by Margot Lévêque.

On this page