Views
Views are webpages composed of components connected by bindings and event handlers.
Baseten allows you to create views that users can interact with. These views can interact with models and worklets deployed on Baseten, display data from queries, and can have input and actions embedded within them. Views are designed to be configurable without writing HTML and CSS, and for the most part, JavaScript. Once views have been created and configured, they can be viewed by operators on Baseten, or alternatively, can be shared publicly through Baseten's sharing flow.

Managing views

First, create a new application or navigate to an existing application. Open the application menu on the top-left, and create a new view with the "+" button. The whitespace in the center is your canvas; this is a live preview of what users will see. The right sidebar is where you configure the user interface — this is where you will add and configure components.
From the three-dot menu next to a view's name, you can take the following actions:
  • Make home: Make this view the default view that an end user sees when opening your application.
  • Rename: Change the view's name.
  • Clone: Create an exact copy of this view and all of its components.
  • Delete: Delete this view. If it is the home view, another view will become home. Carefully ensure that the view is totally unused before deleting it.

Canvas width

Canvas width is a property of the canvas. The canvas property menu can be accessed by clicking anywhere within the empty space on the canvas.
A view can have one of three widths:
  • Small: 820 pixels. This is best when you need users to read top-to-bottom, or when there are fewer components in the view.
  • Medium: 1060 pixels. Goldilocks zone or half-measure? It's up to you!
  • Large: 1300 pixels. At this width, a view is best-suited for taking up an entire desktop screen. It's helpful when you are building applications that have a lot of information.
When shrinking the width of the canvas, components will attempt to re-arrange themselves to fit in the narrower space. When expanding the canvas, components will remain in their existing layout unless you move them individually.
The canvas will expand vertically as much as is necessary to fit the components placed within it.