Input Settings
An input is one control in the Studio settings panel. Merchants change it, and your component receives the value as a prop named after the input’sname. Inputs live in a schema’s settings groups; see Component Schema.
Inputs fall into two groups:
- Basic inputs hold a value directly: text, numbers, colors, images.
- Resource picker inputs select Shopify resources and return their
idandhandle. A loader fetches the rest.
Anatomy
condition
A function that receives the component’s current settings and returns whether to show the input. Annotate data with your settings type:
'showButton.eq.true') is deprecated.
helpText
helpText accepts HTML, so it can carry links and emphasis:
shouldRevalidate
In a Next.js storefront, loaders live only in the server registry, so Studio can’t tell which inputs a loader reads. Set shouldRevalidate: true on every input your loader depends on, resource pickers included. Studio then re-runs that one component’s loader through your revalidation route when the merchant changes the input. Without it, the settings update but loaderData stays stale until the page reloads.
Basic Inputs
heading
Adds a title inside a settings group to organize long lists. It holds no value and needs no name.
text
A single line of plain text, for headings, button labels and short messages.
Returns string.
textarea
Multi-line plain text, for descriptions, quotes and policies.
Returns string.
richtext
A rich text editor that produces HTML. It includes AI-assisted writing.
Returns string (HTML).
Render the value as HTML in your component:
switch
An on/off toggle.
Returns boolean.
range
A slider for a number within a range.
Returns number.
select
A dropdown with one choice.
Returns string, the chosen option’s value.
toggle-group
The same single choice as select, shown as a row of buttons. It suits short lists.
Returns string, the chosen option’s value.
Options can show icons instead of text. The label then becomes the tooltip:
Not every Lucide icon is available yet. Ask in the Slack community if one you need is missing.
image
Lets merchants pick or upload an image. It opens the Media Manager with the images from the Files page of the merchant’s Shopify admin. Uploads are saved there too, and merchants can edit alt text and set a focal point.
Returns a WeaverseImage:
defaultValue can be a WeaverseImage object where only url is required, or the image URL as a string.
Rendering with next/image
Pass the value’s fields to next/image. Allow cdn.shopify.com in images.remotePatterns in next.config, since that is where Shopify serves the files.
defaultValue may have no width or height. Guard on url, and use fill (or check the dimensions) because next/image throws without real dimensions. Forward normalizes image values in one helper, lib/weaverse/image.ts, which returns null for anything unusable.
Focal point
Merchants can click Change → Set focal point to choose the part of the image to keep in view when a section crops it. The point is saved on the value asfocalPoint: { x, y }, each from 0 to 1 measured from the top-left corner, and is absent when unset.
The SDK only stores the point. Apply it as object-position on images rendered with object-fit: cover:
object-fit: contain), where it would shift them off center.
Filtering the Media Manager gallery
A theme can hide files from the gallery so a picker offers only what belongs there. Set the store-wide rule as amedia key on your theme schema, and override it per input through configs:
An input’s
configs overrides the theme’s value field by field:
- a missing key inherits the theme’s value,
- a present array or boolean replaces it for this picker,
excludeFilenamePrefixes: []shows every file, ignoring the theme’s list.
media key filters nothing.
video
Lets merchants pick or upload a video from the Files page, the same way as image. It accepts the same configs for filtering the gallery.
Returns a WeaverseVideo:
color
A color picker.
Returns string, a hex color (#RRGGBB, or #RRGGBBAA with alpha).
datepicker
A date and time picker, for countdowns, events and promotions.
Returns number, a timestamp in milliseconds.
Format the timestamp for display:
map-autocomplete
A location field that suggests places as the merchant types.
Returns string, the selected place.
position
Picks a content position on a 3×3 grid of arrows.
Returns string, one of top left, top center, top right, center left, center center, center right, bottom left, bottom center or bottom right.
url
A URL field with a link picker for pages in the store.
Returns string.
Render internal paths with next/link. The picker returns Shopify-style paths (/products/..., /collections/...); if your routes differ, declare them in the theme schema’s routes so Studio links to the right place. See Theme routes.
Resource Picker Inputs
Resource pickers let merchants search for and select Shopify resources. They return only the resource’sid and handle:
shouldRevalidate: true, so the loader re-runs when the merchant changes the selection.
All of these types come from
@weaverse/hydrogen/next.
product
product-list
collection
collection-list
blog
metaobject
Selects a metaobject from the store.
Fetching the Selected Resource
A loader reads the selection fromdata and queries the Storefront API. This one uses the commerce.storefront client you pass to the server client:
type. Data Fetching covers the loader arguments, the commerce context, querying in the request’s market, and caching.
Next Steps
Component Schema
Groups, children, presets and availability.
Creating Components
Write, register and type a component.
Data Fetching
Turn resource picker selections into data.
Rendering Pages
Render Weaverse pages in App Router routes.