+ CreateResource is a block - a CLI-installed component that + you own and can customize. Unlike regular components, blocks are copied into + your project so you have full control over the code. +
+**1. Initialize Kumo config (first time only)**
+ +```bash +npx @cloudflare/kumo init +``` + +**2. Install the block**
+ +```bash +npx @cloudflare/kumo add CreateResource +``` + +**3. Import from your local path**
+ +```tsx +// The path depends on your kumo.json blocksDir setting +// Default: src/components/kumo/ +import { + CreateResource, + CreateResourceStep, +} from "./components/kumo/create-resource/create-resource"; +``` + +Create tunnel "{name}"?
++ The CreateResource block follows a data-driven, controlled component + pattern: +
++ A simplified single-step wizard with appliance type selection and dynamic + fields. +
+A creation flow that includes inline sub-resource creation, such as adding a custom item within the main wizard.
+| Prop | +Type | +Default | +Description | +
|---|---|---|---|
| breadcrumbs | +ReactNode | +— | +Content for the header breadcrumb area | +
| onClose | +() => void | +— | +Called when the X button is clicked | +
| step | +number | +— | +Current active step index (controlled) | +
| onStepChange | +(step: number) => void | +— | +Called when navigating to a different step | +
| steps | +CreateResourceStepItem[] | +— | +Array of step definitions | +
| headerActions | +ReactNode | +— | +Optional slot between breadcrumbs and close button | +
| size | +"base" | "lg" | +"base" | +Width of the card stack | +
| lockNavigation | +boolean | +false | +Prevents clicking sidebar/previous steps to navigate back | +
| hideStepNavigation | +boolean | +false | +Hides sidebar and stacked card peek-back interaction | +
| closeButtonRef | +RefObject<HTMLButtonElement> | +— | +Ref to the close button for external focus management | +
| className | +string | +— | +Additional class for the outer container | +
| Property | +Type | +Description | +
|---|---|---|
| key | +string | +Unique identifier for the step | +
| label | +string | +Label shown in the sidebar navigation | +
| content | +ReactNode | ++ The step content (typically a CreateResourceStep) + | +
| showError | +boolean | ++ Whether to show an error indicator on this step + | +
| hideFromNavigation | +boolean | +Hide this step from the sidebar navigation | +
| Prop | +Type | +Description | +
|---|---|---|
| title | +string | +Step heading | +
| description | +string | +Step description text | +
| footer | +ReactNode | +Footer content (typically Back/Next buttons) | +
| children | +ReactNode | +Step body content | +
| className | +string | +Additional class for the card | +