Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

14 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

Browser Extensions Manager UI

This is a solution to the Browser extensions manager UI challenge on Frontend Mentor. Frontend Mentor challenges help you improve your coding skills by building realistic projects.

Table of contents

Overview

The challenge

Users should be able to:

  • Toggle extensions between active and inactive states
  • Filter active and inactive extensions
  • Remove extensions from the list with confirmation dialog
  • Switch between light and dark color themes
  • View the optimal layout for the interface depending on their device's screen size
  • See hover and focus states for all interactive elements on the page

Screenshot

Browser Extensions Manager UI: desktop dark mode

Browser Extensions Manager UI: desktop dark mode

Browser Extensions Manager UI: desktop light mode

Browser Extensions Manager UI: desktop light mode

Browser Extensions Manager UI: mobile dark mode

Browser Extensions Manager UI: mobile dark mode

Browser Extensions Manager UI: mobile light mode

Browser Extensions Manager UI: mobile light mode

Links

My process

Built with

  • React 19 - Latest React version with modern features
  • TypeScript - For type safety and better development experience
  • Vite - Fast build tool and development server
  • CSS Modules - For component-scoped styling
  • CSS Custom Properties - For theming and design system
  • CSS Container Queries - For responsive design
  • Semantic HTML5 - Accessible and meaningful markup
  • CSS Grid & Flexbox - Modern layout techniques
  • Mobile-first workflow - Progressive enhancement approach

Features

🎨 Advanced Theming System

  • Light/Dark mode toggle with system preference detection
  • Smooth theme transitions with CSS custom properties
  • Color scheme persistence across sessions

πŸ”§ Extension Management

  • Filter Extensions: All, Active, or Inactive states
  • Toggle Status: Enable/disable extensions with visual feedback
  • Remove Extensions: Confirmation dialog prevents accidental deletion
  • Real-time Updates: State management with React hooks

πŸ“± Responsive Design

  • Mobile-first approach (320px - desktop)
  • Flexible grid layout that adapts to content
  • Touch-friendly interface elements
  • Accessible navigation

β™Ώ Accessibility Features

  • Keyboard navigation support
  • Focus management
  • High contrast support
  • Semantic HTML structure

Project Structure

src/
β”œβ”€β”€ components/           # Reusable UI components
β”‚   β”œβ”€β”€ Button/          # Generic button component
β”‚   β”œβ”€β”€ Card/            # Extension card with actions
β”‚   β”œβ”€β”€ CheckButton/     # Toggle switch component
β”‚   β”œβ”€β”€ Contact/         # Footer contact links
β”‚   β”œβ”€β”€ ExtensionFilter/ # Filter radio buttons
β”‚   β”œβ”€β”€ ExtensionList/   # Grid of extension cards
β”‚   β”œβ”€β”€ HeaderBar/       # App header with logo and theme toggle
β”‚   β”œβ”€β”€ Icon/            # App logo component
β”‚   └── ToggleButton/    # Theme switcher
β”œβ”€β”€ containers/          # Page-level components
β”‚   └── Extensions/      # Main extensions container
β”œβ”€β”€ hooks/               # Custom React hooks
β”‚   └── useExtensions.ts # Extension state management
β”œβ”€β”€ types/               # TypeScript type definitions
β”‚   └── index.ts         # Shared interfaces and types
β”œβ”€β”€ data/                # Static data
β”‚   └── data.json        # Extensions dataset
└── assets/              # Static assets
    β”œβ”€β”€ css/             # Global styles and reset
    β”œβ”€β”€ fonts/           # Noto Sans font family
    └── images/          # Icons and logos

Dev techniques applied

Advanced React Patterns

// Custom hook for state management and business logic
export const useExtensions = () => {
  const [data, setData] = useState<Extension[]>(jsonData)
  const [currentFilter, setCurrentFilter] = useState<FilterType>('All')

  const filteredData = useMemo(() => {
    switch (currentFilter) {
      case 'Active': return data.filter(ext => ext.isActive)
      case 'Inactive': return data.filter(ext => !ext.isActive)
      default: return data
    }
  }, [data, currentFilter])

  // ... rest of hook logic
}

Modern CSS Techniques

/* CSS Custom Properties for theming */
:root {
  color-scheme: light dark;
  --background-color: light-dark(#ebf2fc, #040918);
  --text-color: light-dark(var(--neutral-600), var(--neutral-300));
}

/* Responsive grid with CSS Grid */
.extensionGrid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1.5rem;
}

TypeScript Best Practices

// Strongly typed interfaces for better development
export interface Extension {
  logo: string;
  name: string;
  description: string;
  isActive: boolean;
}

export type FilterType = 'All' | 'Active' | 'Inactive'

Dialog API Implementation

// Native HTML dialog for confirmation modals
const openDialog = () => {
  const dialog = document.getElementById(dialogId) as HTMLDialogElement;
  if (dialog) {
    dialog.showModal();
  }
};

Continued development

Areas for future enhancement:

  • Data Persistence: Local storage or API integration
  • Search Functionality: Filter extensions by name/description
  • Analytics: Usage statistics and performance metrics
  • Animation: Framer Motion for enhanced UX
  • Testing: Unit and integration tests with Vitest
  • Extension Categories: Grouping and sorting capabilities

Useful resources

Author

Getting started

Prerequisites

  • Node.js (v18 or higher)
  • npm, yarn, or pnpm

Installation

  1. Clone the repository

    git clone https://github.com/hadodev/browser-extensions-manager.git
    cd browser-extensions-manager
  2. Install dependencies

    npm install
    # or
    yarn install
    # or
    pnpm install
  3. Start development server

    npm run dev
    # or
    yarn dev
    # or
    pnpm dev
  4. Build for production

    npm run build
    # or
    yarn build
    # or
    pnpm build
  5. Preview production build

    npm run preview
    # or
    yarn preview
    # or
    pnpm preview

Development

  • Development server: Runs on http://localhost:5173

Challenge by Frontend Mentor | Coded by HaDo Dev πŸš€

About

Browser Extensions Manager UI. Frontend Mentor Challenge

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages