A modern TypeScript component library built with React and Storybook. This library provides a collection of reusable UI components with comprehensive documentation and examples.
- TypeScript Support: Full TypeScript support with type definitions
 - Storybook Integration: Interactive component documentation and testing
 - Modern CSS: CSS custom properties and modern styling patterns
 - Accessible: Built with accessibility best practices
 - Customizable: Easy to theme and customize
 - Tree Shakeable: Optimized for bundle size
 
A versatile button component with multiple variants and states.
import { Button } from 'lib-components';
<Button variant="primary" size="md" onClick={handleClick}>
  Click me
</Button>Variants: primary, secondary, outline, ghost, danger
Sizes: sm, md, lg
States: disabled, loading
A form input component with validation states and helper text.
import { Input } from 'lib-components';
<Input
  label="Email Address"
  type="email"
  placeholder="Enter your email"
  error={hasError}
  errorMessage="Please enter a valid email"
/>Types: text, email, password, number, tel, url, search
Sizes: sm, md, lg
States: disabled, error, required
A flexible card component with header, content, and footer sections.
import { Card, CardHeader, CardContent, CardFooter } from 'lib-components';
<Card variant="elevated">
  <CardHeader>
    <h3>Card Title</h3>
  </CardHeader>
  <CardContent>
    <p>Card content goes here</p>
  </CardContent>
  <CardFooter>
    <Button>Action</Button>
  </CardFooter>
</Card>Variants: default, elevated, outlined
Padding: none, sm, md, lg
Interactive: Hover and click states
A small status indicator component for labels and notifications.
import { Badge } from 'lib-components';
<Badge variant="success" size="md" rounded>
  Active
</Badge>Variants: default, primary, success, warning, error, info
Sizes: sm, md, lg
Options: rounded
A dropdown select component with options and validation.
import { Select } from 'lib-components';
<Select
  label="Choose Team"
  options={teamOptions}
  value={selectedTeam}
  onChange={handleChange}
  placeholder="Select a team"
/>A multi-line text input component with auto-resize and character counting.
import { Textarea } from 'lib-components';
<Textarea
  label="Description"
  placeholder="Enter description"
  rows={4}
  maxLength={500}
  autoResize
/>A user avatar component with fallback initials and multiple sizes.
import { Avatar } from 'lib-components';
<Avatar
  src={user.avatarUrl}
  fallback={user.name}
  size="lg"
  shape="circle"
/>A card component for displaying user information.
import { UserCard } from 'lib-components';
<UserCard
  user={user}
  showDetails={true}
  clickable={true}
  onClick={handleUserClick}
/>A card component for displaying league information and actions.
import { LeagueCard } from 'lib-components';
<LeagueCard
  league={league}
  showJoinButton={true}
  isMember={false}
  onJoin={handleJoinLeague}
/>A card component for displaying game information and picks.
import { GameCard } from 'lib-components';
<GameCard
  game={game}
  showPickActions={true}
  hasPick={false}
  onPick={handleMakePick}
/>A form component for making game picks.
import { PickForm } from 'lib-components';
<PickForm
  game={game}
  teams={teams}
  showConfidence={true}
  onSubmit={handleSubmitPick}
/>A table component for displaying league standings.
import { StandingsTable } from 'lib-components';
<StandingsTable
  standings={standings}
  showAvatars={true}
  highlightCurrentUser={true}
/>A notification component for displaying messages to users.
import { Alert } from 'lib-components';
<Alert variant="success" dismissible onDismiss={handleDismiss}>
  Your pick has been submitted successfully!
</Alert>A loading indicator component with multiple variants.
import { Loading } from 'lib-components';
<Loading variant="spinner" size="lg" text="Loading your picks..." />A responsive container component for page layout.
import { Container } from 'lib-components';
<Container maxWidth="xl" padding="lg">
  <h1>Page Content</h1>
</Container>A navigation header component with branding and user actions.
import { Header } from 'lib-components';
<Header
  title="Football Pickem"
  navItems={navItems}
  user={currentUser}
  isAuthenticated={true}
  onLogout={handleLogout}
/># Install the package
npm install @your-org/lib-components// Import components and styles
import { Button, Card, GameCard } from '@your-org/lib-components';
import '@your-org/lib-components/styles';
function App() {
  return (
    <div>
      <Button variant="primary">Click me</Button>
      <Card>Content</Card>
      <GameCard game={gameData} />
    </div>
  );
}# Install dependencies
npm install
# Start development server
npm run dev
# Start Storybook
npm run storybook
# Build the library
npm run build
# Build Storybook
npm run build-storybookThe library uses CSS custom properties for easy theming. You can override the default values:
:root {
  --primary-500: #your-color;
  --gray-100: #your-gray;
  --spacing-md: 1rem;
  --radius-md: 0.5rem;
}This project includes Storybook for component development and documentation. To start Storybook:
npm run storybookStorybook provides:
- Interactive component playground
 - Documentation with examples
 - Controls for testing different props
 - Accessibility testing
 - Visual regression testing
 
src/
βββ components/          # Generic reusable components
β   βββ Button/
β   βββ Input/
β   βββ Card/
β   βββ Badge/
β   βββ Alert/
β   βββ Avatar/
β   βββ Select/
β   βββ Textarea/
β   βββ Loading/
β   βββ Container/
β   βββ Header/
β   βββ UserCard/
βββ projects/           # Project-specific components
β   βββ FootballPickem/ # Football pickem domain components
β       βββ GameCard/
β       βββ LeagueCard/
β       βββ PickForm/
β       βββ StandingsTable/
βββ styles/             # Global styles and CSS variables
βββ index.ts           # Main export file
.storybook/            # Storybook configuration
βββ main.ts
βββ preview.ts
This library is organized into two main categories:
These are reusable UI components that can be used in any application:
- Button, Input, Card, Badge - Basic UI elements
 - Alert, Loading - Feedback components
 - Select, Textarea - Form components
 - Avatar, UserCard - User-related components
 - Container, Header - Layout components
 
These contain domain-specific business logic and are organized by project:
- FootballPickem - Components specific to football pickem functionality
- GameCard, LeagueCard, PickForm, StandingsTable
 
 
- Create a new component directory in 
src/components/ - Implement the component with TypeScript interfaces
 - Add CSS styles using the design system variables
 - Create an index file for exports
 - Add Storybook stories for documentation
 - Export from the main 
src/index.tsfile 
- Create a new project directory in 
src/projects/if it doesn't exist - Create the component directory within the project folder
 - Follow the same implementation steps as generic components
 - Update the main 
src/index.tsfile to export from the new location - Update Storybook story titles to reflect the project organization
 
- Use TypeScript for all components
 - Follow React best practices
 - Use CSS custom properties for styling
 - Include comprehensive prop documentation
 - Write Storybook stories for all components
 
npm run build- Build the TypeScript librarynpm run dev- Watch mode for developmentnpm run storybook- Start Storybook development servernpm run build-storybook- Build static Storybooknpm run lint- Run ESLintnpm run lint:fix- Fix ESLint issues
- Fork the repository
 - Create a feature branch
 - Make your changes
 - Add tests and stories
 - Submit a pull request
 
MIT License - see LICENSE file for details.
- Storybook Documentation (when running locally)
 - Component API Documentation (generated from Storybook)