Skip to main content

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’s name. 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 id and handle. 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:
The string form ('showButton.eq.true') is deprecated.

helpText

helpText accepts HTML, so it can carry links and emphasis:
Help text input example

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.
Heading input type example

text

A single line of plain text, for headings, button labels and short messages. Returns string.
Text input example

textarea

Multi-line plain text, for descriptions, quotes and policies. Returns string.
Textarea input example

richtext

A rich text editor that produces HTML. It includes AI-assisted writing. Returns string (HTML).
Rich text input example Render the value as HTML in your component:

switch

An on/off toggle. Returns boolean.
Switch input example

range

A slider for a number within a range. Returns number.
Range input example

select

A dropdown with one choice. Returns string, the chosen option’s value.
Select input example

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.
Toggle group text input example Options can show icons instead of text. The label then becomes the tooltip:
Toggle group icon input example 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. Image input example

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.
The value can be missing or partial: a merchant can clear the input, and a 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 as focalPoint: { 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:
Skip it for images that aren’t cropped (object-fit: contain), where it would shift them off center. A theme can hide files from the gallery so a picker offers only what belongs there. Set the store-wide rule as a media 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.
Pickers opened outside an input schema (the SEO image field, the rich text editor and the Translation Manager) apply the theme’s rules alone. A theme with no 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:
Video input example

color

A color picker. Returns string, a hex color (#RRGGBB, or #RRGGBBAA with alpha).
Color input example

datepicker

A date and time picker, for countdowns, events and promotions. Returns number, a timestamp in milliseconds.
Date picker input example Format the timestamp for display:
The server and the browser can format a date differently (time zones, locales), which causes a hydration mismatch. Pass an explicit timeZone to toLocaleDateString, or format the date in the loader.

map-autocomplete

Experimental. It may not work as expected.
A location field that suggests places as the merchant types. Returns string, the selected place.
Map autocomplete input example

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.
Position input example

url

A URL field with a link picker for pages in the store. Returns string.
URL input example 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’s id and handle:
The full data comes from a loader. Give every resource picker shouldRevalidate: true, so the loader re-runs when the merchant changes the selection. All of these types come from @weaverse/hydrogen/next.

product

Product input example

product-list

Product list input example

collection

Collection input example

collection-list

Collection list input example

blog

Blog input example

metaobject

Selects a metaobject from the store.
Metaobject input example

Fetching the Selected Resource

A loader reads the selection from data and queries the Storefront API. This one uses the commerce.storefront client you pass to the server client:
The component renders a placeholder until something is picked:
Add the loader to the server registry, keyed by the component’s 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.
Last modified on November 30, 2026