· Announcements · 2 min read
Introducing Content Previews in Vyuh
A powerful new feature for rapid content and layout development with Flutter and your CMS
Today, we’re excited to introduce Content Previews, a powerful new feature in the Vyuh Framework that revolutionizes how developers work with content and layouts in Flutter + Sanity.io applications.
The Challenge of Content Development
When building content-driven applications, developers often face a common challenge: testing layouts without having actual content in their CMS. This typically leads to either creating temporary content in Sanity.io (which needs cleanup later) or hardcoding sample data (which might not represent real-world scenarios).
Enter Content Previews
Content Previews in Vyuh solves this challenge elegantly. It allows developers to:
- Define preview data directly in their content types and layouts
- Test different content variations without touching the CMS
- Maintain type safety throughout the development process
- Rapidly iterate on layout designs
Here’s a simple example of how it works:
static final typeDescriptor = TypeDescriptor(
schemaType: 'vyuh.card',
title: 'Card',
fromJson: Card.fromJson,
preview: () => Card(
title: 'Sample Card Title',
description: 'A preview description for development',
imageUrl: Uri.parse('https://picsum.photos/300/200'),
),
);
The Content Playground
Along with Content Previews, we’re introducing the Content Playground - an interactive development environment where you can:
- Browse all available content types in your application
- Test different layout variations in real-time
- Validate content structure and visual designs
- Identify which features provide specific layouts
The playground is accessible through the Developer Tools section of your Vyuh application, making it easy to experiment and validate your content structure during development.
Benefits for Teams
Content Previews brings several benefits to development teams:
- Faster Development: No need to switch between your IDE and CMS during layout development
- Better Collaboration: Designers and developers can work together more effectively
- Improved Testing: Easy to test edge cases and different content variations
- Documentation: Preview examples serve as living documentation
Getting Started
To start using Content Previews, update to the latest version of Vyuh Framework. The feature is available out of the box, and you can start adding preview data to your content types and layouts immediately.
Check out our documentation for detailed information about implementing and using Content Previews in your projects.
What’s Next?
We’re continuing to enhance the Content Preview feature with more capabilities:
- Support for more complex content scenarios
- Additional layout testing tools
- Performance optimization features
- Enhanced playground capabilities
Stay tuned for more updates, and let us know how you’re using Content Previews in your projects!