You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Build a Netflix-style Label component with multiple label types based on the Figma design. This component displays various content labels including ranking labels, TOP 10 icons, and status labels with consistent Netflix branding.
All label type variants (ranking, top10-icon, status)
Dynamic ranking number display
Proper text rendering for all variants
Responsive behavior
Accessibility compliance
Visual consistency across types
Proper spacing and alignment
Usage Examples
// Ranking label<Labeltype="ranking"ranking={2}category="TV Shows Today"/>// Standalone TOP 10 icon<Labeltype="top10-icon"/>// Status labels<Labeltype="status"variant="recently-added"/><Labeltype="status"variant="new-season"/><Labeltype="status"variant="leaving-soon"/>// With custom styling<Labeltype="ranking"ranking={1}category="Movies"className="custom-class"/>
Design Tokens Reference
Netflix Red: #E50914
Text Color: #FFFFFF
Font Family: Netflix Sans Bold
Font Weight: 700 (Bold)
Border Radius: Slightly rounded corners
Layout: Flexbox with center alignment
Spacing: Consistent gaps and padding
Component Hierarchy
Label/
├── Label.tsx # Main component with conditional rendering
├── Label.module.css # All styling for different label types
├── Label.types.ts # TypeScript interfaces
├── Label.stories.tsx # Storybook stories for all variants
└── index.ts # Export file
Label Component Instructions
Overview
Build a Netflix-style Label component with multiple label types based on the Figma design. This component displays various content labels including ranking labels, TOP 10 icons, and status labels with consistent Netflix branding.
Component Structure
Create the following files in
src/components/Label/:Label.tsx- Main componentLabel.module.css- StylesLabel.types.ts- TypeScript interfacesLabel.stories.tsx- Storybook storiesindex.ts- Export fileProps Interface
Design Specifications
Label Types
Visual Elements
Ranking Labels
TOP 10 Icons (Standalone)
Status Labels
Layout Structure
CSS Variables to Use
--netflix-red(#E50914) for background colors--white(#FFFFFF) for text color--font-familyfor Netflix Sans font family--font-bold(700) for font weight--radius-smallfor border radius--transition-basefor animationsImplementation Notes
Ranking Label Structure
TOP 10 Icon Structure
Status Label Structure
Key Features to Implement
CSS Classes Structure
Variant Mapping
Status Label Variants
recently-added→ "Recently Added"new-season→ "New Season"leaving-soon→ "Leaving Soon"Ranking Label Examples
ranking={2}+category="TV Shows Today"→ "feat: added Storybook to the project #2 in TV Shows Today"ranking={1}+category="Movies"→ "feat: add api url config #1 in Movies"Testing Requirements
Usage Examples
Design Tokens Reference
Component Hierarchy
Accessibility Considerations
<span>,<div>)