Curated
Free
Recently Added
Components
Async Button
Background
Background: Background Effects
Background: Background Gradients
Background: Background Patterns
Background: Background Shaders
Code Block
Effect
Effect: Background Effects
Effect: Border Effects
Effect: Hover Effects
Effect: Media Effects
Effect: Text Effects
File Tree
Image Slider
Lightbox
Media Annotation
Progress
Shaders
Shaders: 3D Scenes
Shaders: Backgrounds
Terminal Playback
Theme Switcher
Blocks
404
Authentication
Bento
Blog
Blog Post
Case Study
Comparison
Contact
Cta
Faq
Feature
Footer
Form
Hero
Integration
Legal Page
Logo Cloud
Navigation
Press Awards
Pricing
Product Tour
Profile
Service Page
Services
Steps
Team
Testimonial
Theme
My Themes
Local Save
Built-in Themes
Default
Amber Minimal
Aurora
Blue Shift
Cyberpunk
Darkmatter
Espresso
Event Horizon
Monochrome
Nature
Nightshade
Overclock
Soft Lavender
Twitter
Code Block 3 - Split Comparison
Pro
A split-pane code comparison component for showing before and after snippets, API migrations, or competing implementations.
Implementation comparison
Compare two approaches side by side
REST endpoint
Several manual response branches
api/users.ts
export async function GET(request: Request) {
const url = new URL(request.url);
const teamId = url.searchParams.get("teamId");
if (!teamId) {
return Response.json({ error: "Missing teamId" }, { status: 400 });
}
const users = await db.user.findMany({ where: { teamId } });
return Response.json({ users });
}Typed action
Validated input with one return shape
users.action.ts
const input = z.object({
teamId: z.string().min(1),
});
export const listUsers = action(input, async ({ teamId }) => {
const users = await db.user.findMany({ where: { teamId } });
return { users };
}); Loading code...
Starwind Dependencies
Sign in to view code and copy install commands.
Sign inThis component requires Starwind Pro.
Get lifetime access to all premium components, updates, and priority support.
Upgrade to ProFailed to load code. Please try again.