Introducing the Slot control

← Back to all updates // Oct 20, 2022

New feature

With Makeswift’s API you can map visual controls to your React component’s props to make your Next.js app visually editable. We provide controls like `Style`, `Shape`, `List`, `Combobox`, and more, so you can get the props you need without having to refactor your components.



For many components, one of the most important props is `children`, which usually expects a `ReactNode`. Until now Makeswift has not had a control that allows you to visually edit this prop.



With the latest version of `@makeswift/runtime`, we’ve introduced the `Slot` control. This control allows your components to receive `ReactNode` as props, unlocking visual composition for your custom components. `Slot` is powered by the same layout technology that powers our Box component.



To get the `Slot` control, upgrade to the latest version of `@makeswift/runtime`

npm upgrade @makeswift/runtime@latest

Or if you’re using Yarn

yarn upgrade @makeswift/runtime@latest

IMPORTANT: If you’re still on version v0.1 make sure to read our migration instructions for v0.2!

Using the Slot control to build a Disclosure component

Limitations of Slot

Currently the `Slot` control cannot be used with the `Shape` and `List` controls. For example, if you wanted to provide a `slides` prop for a carrousel component that was a `ReactNode[]`, you would not be able to use `List({ type: Slot() })` to achieve that. We're working to fix this limitation. Stay tuned!

improvements & fixes

  • Fixed an issue that was preventing table email notifications from being sent
  • Fixed an issue where malformed redirects were causing revalidation errors
  • Fixed a bug that caused favicons to not be displayed in the browser tab
  • Improved focus management in login and signup views
  • Improved error messaging related to roles and permissions throughout the app
  • Fixed an issue where realtive paths used in links weren’t working on live pages
  • Added a meta tag to live pages to ensure preview cards displayed properly when sharing Makeswift sites on Twitter
  • Added banners to warn users when their account billing is overdue or unpaid, also alerting them if their pages were taken offline

Go ahead and build.

Don't have a Next.js project yet? Get started with our no code builder and extend when you're ready.

Arrow pointing down

Integrate your Next.js app