import type { Meta, StoryObj } from '@storybook/nextjs-vite'
import { ParallaxImageShowcase } from '../components/features/parallax-image-showcase'
/** Generate a placeholder screenshot SVG as a data URI */
const makePlaceholder = (label: string, bg = '#1e1e2e', fg = '#a6adc8') =>
`data:image/svg+xml,${encodeURIComponent(
``
)}`
const images = [
{ src: makePlaceholder('Dashboard', '#1e1e2e'), alt: 'Dashboard', position: 'left' as const },
{ src: makePlaceholder('Analytics', '#1a1b26'), alt: 'Analytics', position: 'center' as const },
{ src: makePlaceholder('Settings', '#191724'), alt: 'Settings', position: 'right' as const },
]
const meta = {
title: 'Features/ParallaxImageShowcase',
component: ParallaxImageShowcase,
argTypes: {
layout: {
control: 'select',
options: ['non-boxed', 'boxed', 'grid'],
},
intensity: {
control: { type: 'number', min: 0, max: 10, step: 0.1 },
},
shadow: { control: 'boolean' },
},
parameters: {
layout: 'fullscreen',
},
tags: ['autodocs'],
decorators: [
(Story) => (
),
],
} satisfies Meta
export default meta
type Story = StoryObj
// === Layout Variants ===
/**
* Default non-boxed layout with three overlapping layers and parallax depth.
*/
export const NonBoxed: Story = {
args: {
images,
layout: 'non-boxed',
},
}
/**
* Boxed layout with two-row structure — logo on top, images below.
*/
export const Boxed: Story = {
args: {
images,
layout: 'boxed',
logoElement: (
Logo
),
},
}
/**
* Grid layout — simple 3-column grid with gentle parallax.
*/
export const Grid: Story = {
args: {
images,
layout: 'grid',
},
}
// === Intensity Variants ===
/**
* Subtle animation — barely noticeable movement.
*/
export const SubtleIntensity: Story = {
args: {
images,
layout: 'non-boxed',
intensity: 0.3,
},
}
/**
* Aggressive animation — exaggerated movement.
*/
export const HighIntensity: Story = {
args: {
images,
layout: 'non-boxed',
intensity: 5,
},
}
// === Grid Options ===
/**
* Grid layout with shadow enabled on each image.
*/
export const GridWithShadow: Story = {
args: {
images,
layout: 'grid',
shadow: true,
},
}
/**
* Grid with higher intensity for more dramatic parallax.
*/
export const GridHighIntensity: Story = {
args: {
images,
layout: 'grid',
intensity: 3,
shadow: true,
},
}
// === Partial Images ===
/**
* Only two images provided (left + center).
*/
export const TwoImages: Story = {
args: {
images: images.slice(0, 2),
layout: 'non-boxed',
},
}
/**
* Single image only.
*/
export const SingleImage: Story = {
args: {
images: [images[0]],
layout: 'grid',
},
}