import type { Meta, StoryObj } from '@storybook/react'; import { useState } from 'react'; import { PxlKitSurfaceProvider, type Surface } from './common'; import { PixelButton, PxlKitButton } from './actions'; import { PixelInput } from './forms/PixelInput'; import { PixelCheckbox } from './forms/PixelCheckbox'; import { PixelSwitch } from './forms/PixelSwitch'; import { PixelSlider } from './forms/PixelSlider'; import { PixelSegmented } from './forms/PixelSegmented'; import { PixelCard } from './cards/PixelCard'; import { PixelStatCard } from './cards/PixelStatCard'; import { PixelBadge } from './data/PixelBadge'; import { PixelChip } from './data/PixelChip'; import { PixelKbd } from './data/PixelKbd'; import { PixelCodeInline } from './data/PixelCodeInline'; import { PixelAlert, PixelProgress } from './feedback'; import { PixelTabs } from './navigation'; import { PixelDivider, PixelSection } from './layout'; const meta: Meta = { title: 'Foundations / Surface', parameters: { layout: 'padded' }, }; export default meta; type Story = StoryObj; const PlayIcon = ( ); function ComponentZoo({ surface }: { surface: Surface }) { const [checked, setChecked] = useState(true); const [switched, setSwitched] = useState(true); const [vol, setVol] = useState(60); const [seg, setSeg] = useState('grid'); return (
Start render Ghost Working
stable hot {}} />
Pxlkit ships 54 components with switchable surface.

}, { id: 'usage', label: 'Usage', content:

Wrap children in {''} to flip aesthetics.

}, ]} />

The same card auto-styles to match the active surface. Press S to flip.

); } /** Both surfaces side by side — see them swap aesthetics instantly. */ export const SideBySide: Story = { render: () => (
), }; /** Pixel — the default chunky retro look. */ export const PixelOnly: Story = { render: () => , }; /** Linear — softer modern aesthetic with the same API. */ export const LinearOnly: Story = { render: () => , };