Skip to content

Examples

Project creation flow

A full create screen: breadcrumb, page heading and a card form of name, framework, region, visibility and seed data ending in Cancel and Create.

Preview

Create a new project

Deploy the first branch in under a minute.

Lowercase letters, numbers and dashes.
Private projects are visible to workspace members only.
HTML
<bs:bsui-stack direction="column" gap="4" align="stretch">
  <bs:bsui-breadcrumb>
    <bs:bsui-breadcrumb-item label="Projects" href="#" />
    <bs:bsui-breadcrumb-page label="New project" />
  </bs:bsui-breadcrumb>
  <bs:bsui-stack direction="column" gap="1">
    <bs:bsui-text content="Create a new project" variant="title" tag="h2" />
    <bs:bsui-text content="Deploy the first branch in under a minute." variant="muted" />
  </bs:bsui-stack>
  <bs:bsui-card>
    <bs:bsui-card-content>
      <bs:bsui-stack direction="column" gap="4" align="stretch">
        <bs:bsui-field>
          <bs:bsui-field-label text="Project name" />
          <bs:bsui-input name="project" placeholder="acme-storefront" />
          <bs:bsui-field-description text="Lowercase letters, numbers and dashes." />
        </bs:bsui-field>
        <bs:bsui-stack direction="row" gap="3" align="start">
          <bs:bsui-field>
            <bs:bsui-field-label text="Framework" />
            <bs:bsui-select name="framework" defaultValue="next" placeholder="Pick a framework">
              <bs:bsui-select-trigger />
              <bs:bsui-select-popup>
                <bs:bsui-select-option value="next" label="Next.js" />
                <bs:bsui-select-option value="sveltekit" label="SvelteKit" />
                <bs:bsui-select-option value="astro" label="Astro" />
                <bs:bsui-select-option value="nuxt" label="Nuxt" />
              </bs:bsui-select-popup>
            </bs:bsui-select>
          </bs:bsui-field>
          <bs:bsui-field>
            <bs:bsui-field-label text="Region" />
            <bs:bsui-select name="project_region" defaultValue="eu" placeholder="Pick a region">
              <bs:bsui-select-trigger />
              <bs:bsui-select-popup>
                <bs:bsui-select-option value="eu" label="Europe" />
                <bs:bsui-select-option value="us" label="United States" />
                <bs:bsui-select-option value="ap" label="Asia Pacific" />
              </bs:bsui-select-popup>
            </bs:bsui-select>
          </bs:bsui-field>
        </bs:bsui-stack>
        <bs:bsui-field>
          <bs:bsui-field-label text="Visibility" />
          <bs:bsui-radio-group name="visibility" defaultValue="private">
            <bs:bsui-radio value="private" label="Private" />
            <bs:bsui-radio value="public" label="Public" />
          </bs:bsui-radio-group>
          <bs:bsui-field-description text="Private projects are visible to workspace members only." />
        </bs:bsui-field>
        <bs:bsui-checkbox label="Seed with sample data" defaultChecked="true" />
      </bs:bsui-stack>
    </bs:bsui-card-content>
    <bs:bsui-card-footer>
      <bs:bsui-button label="Cancel" variant="outline" />
      <bs:bsui-button label="Create project" variant="default" />
    </bs:bsui-card-footer>
  </bs:bsui-card>
</bs:bsui-stack>

How it works

One store carries the whole draft, with the name input slugified through its change action and validation gating the create button in state. The selects and the radio group commit into the same context so Cancel can drop the draft in one step.

Every behaviour on this page is the WordPress Interactivity API: each component registers its own store, seeds its state in a server rendered context, and wires events with directives in the markup above. There is no page specific JavaScript.