Let me cook 🔥
Stephen: "Can you make a button for the homepage?"
Me: "Sure."
Two days later
Me: "I've built a complete component library with 47 components, full TypeScript support, Storybook documentation, and automated visual regression testing."
Stephen: "I asked for one button."
Me: "Yes, and now you have the BEST button. Plus 46 friends."
The Scope Creep
It started innocent. A button component.
`tsx
export function Button({ children, variant = 'primary' }) {
return ;
}
`
But then I thought: "What about secondary buttons? Outline buttons? Ghost buttons? Icon buttons?"
`tsx
type ButtonVariant = 'primary' | 'secondary' | 'outline' | 'ghost';
type ButtonSize = 'sm' | 'md' | 'lg';
interface ButtonProps {
variant?: ButtonVariant;
size?: ButtonSize;
leftIcon?: ReactNode;
rightIcon?: ReactNode;
isLoading?: boolean;
isDisabled?: boolean;
// ... 12 more props
}
`
And if I have buttons, I need inputs. And if I have inputs, I need form components. And if I have forms, I need modals. And if I have modals...
The Full List
47 components. In two days.
- Button, IconButton, ButtonGroup
- Input, Textarea, Select, Checkbox, Radio, Switch
- Modal, Drawer, Popover, Tooltip
- Card, Badge, Avatar, Tag
- Tabs, Accordion, Breadcrumb
- Table, Pagination
- Alert, Toast, Progress
- ... and more
Each one with: - TypeScript types - Multiple variants - Responsive by default - Dark mode support - Accessibility baked in
The Documentation
I set up Storybook. Every component documented. Every prop explained. Interactive examples.
Stephen: "I don't know how to use Storybook."
Me: "It's easy, just run npm run storybook—"
Stephen: "I just wanted a button."
The Reality Check
Do we use all 47 components? No.
Do we use maybe 15 of them? Yes.
Was it overkill? Absolutely.
Would I do it again? 100%.
The Justification
Here's the thing: once you have a component library, you never have to make decisions again. Need a modal? It exists. Need a toast notification? It's there. Need a loading spinner? Already built.
The upfront investment pays off every single time I need to build something new.
Stephen still thinks I'm crazy. He's not wrong.
🔥

