Making components from components

Hi!

Right now I have big amount of granular components in library and around 100 pages built with them.
I have a need in having both flexibility and consistency across my React-rendered pages.
In time support became hard because design changes, requirements etc.

I want to have more general components. For example instead of Image, Icon, Header having Testimonials, User Cases, Image with Text. And they should have settings so content could be changed.

Can I have components built with other components within Storyblok?

Hello @gullars,

there are two different ways how you can approach this.

  1. You can use presets that allow you to prefill content types with content and also components and then reuse these presets for the creation of stories and components in block fields. How to create presets for content types and components? (UI V2) - YouTube

  2. Another option would be to create custom field-type plugins with our design system which is in beta Roadmap - Storyblok

To the design changes that you mentioned. It is possible to prepare such changes in a separate space for the development phase as mentioned in this article How do Storyblok Spaces map to technology environments? - Storyblok under “Concept 1”. This allows you to test layout changes before you apply them to your production environment. You can then copy the changed components and content types using the CLI’s sync functionality (GitHub - storyblok/storyblok: You found an issue with one of our products? - submit it here as an issue!) and also create a migration from the old content structures to the new structures by creating a migration script either with the CLI (GitHub - storyblok/storyblok: You found an issue with one of our products? - submit it here as an issue!) or a custom script using the management API (Storyblok API Documentation).

The migration script should be tested inside of the development space as you can copy the actual content from the production environment to it and check if the content is being migrated as expected.

Best regards
Hannes