DEV Community

Cover image for Interactive Premium To-Do List with Modern UI
Gladiators Battle
Gladiators Battle

Posted on

1 1

Interactive Premium To-Do List with Modern UI

A step into sleek productivity with cutting-edge design and functionality.

Managing tasks doesn’t have to be dull. With this Interactive Premium To-Do List, we’ve combined the aesthetics of a modern user interface with powerful functionalities to deliver an app that’s not only practical but visually stunning. Built with HTML, CSS, and JavaScript, this to-do list takes task management to the next level.

In this article, we’ll dive into the features, implementation details, and design choices behind this app.

Features at a Glance
Responsive Design: Adapts seamlessly to all screen sizes, ensuring usability on desktops, tablets, and mobile devices.
Smooth Animations: Enjoy dynamic effects when adding, completing, or deleting tasks.
Drag-and-Drop: Intuitively reorder tasks using drag-and-drop functionality powered by SortableJS.
Local Storage: Tasks persist even after refreshing or closing the browser.
Accessibility: ARIA attributes and keyboard support ensure inclusivity.
Customizable UI: Experience stunning gradients, glow effects, and adaptable themes for a polished, modern aesthetic.
Notification System: Feedback messages keep users informed about their actions, such as adding or deleting tasks.
Breaking Down the Components

  1. HTML Structure The foundation of the to-do list begins with a clean and semantic HTML structure:

Header: A visually appealing title enhanced with an animated icon.
Input Section: A user-friendly input field and button for adding tasks.
Filters: Buttons to switch between "All," "Active," and "Completed" tasks.
Task List: A dynamic

    element where tasks are displayed. Here’s a snippet:
<header>
  <h1><i class="fas fa-check-circle"></i> My To-Do List</h1>
</header>
<section class="input-section">
  <input type="text" id="task-input" placeholder="Add a new task..." aria-label="Add a new task">
  <button id="add-task-btn"><i class="fas fa-plus"></i> Add</button>
</section>
<nav class="filters" aria-label="Task Filters">
  <button class="filter-btn active" data-filter="all"><i class="fas fa-list"></i> All</button>
  <button class="filter-btn" data-filter="active"><i class="fas fa-tasks"></i> Active</button>
  <button class="filter-btn" data-filter="completed"><i class="fas fa-check"></i> Completed</button>
</nav>
<ul class="task-list" aria-live="polite">
  <!-- Tasks will be dynamically added here -->
</ul>
  1. CSS: Modern Aesthetics To ensure a premium look and feel, we used modern CSS techniques, including:

CSS Variables: For easy theming and consistent styling.
Gradients and Glow Effects: Subtle gradients and glow animations elevate the design.
Keyframes: Smooth animations bring the app to life.
Example of the glowing background:

.todo-container::before {
  content: '';
  position: absolute;
  top: -30px;
  left: -30px;
  right: -30px;
  bottom: -30px;
  background: linear-gradient(45deg, var(--accent-color), #6a00f4, #ff4081, var(--accent-color));
  background-size: 400% 400%;
  filter: blur(50px);
  animation: pulseGlow 6s ease-in-out infinite;
}

The result is a visually striking interface that enhances user engagement.

  1. JavaScript Functionality The JavaScript implementation handles dynamic interactions, ensuring a seamless user experience.

Add Task: Users can add tasks via the input field and button. Pressing Enter also triggers this action.
Task Completion: Toggle tasks as completed by checking the box, which updates the task's appearance.
Delete Task: Removes tasks with a fade-out animation for a smooth transition.
Local Storage: Tasks are saved to the browser's local storage, so users can revisit their list later.
Here’s how adding a task works:

function addTask(text, completed = false) {
  const li = document.createElement('li');
  li.classList.add('task-item');
  if (completed) li.classList.add('completed');

  const checkbox = document.createElement('input');
  checkbox.type = 'checkbox';
  checkbox.checked = completed;

  const span = document.createElement('span');
  span.classList.add('task-text');
  span.textContent = text;

  const deleteBtn = document.createElement('button');
  deleteBtn.classList.add('delete-btn');
  deleteBtn.innerHTML = '<i class="fas fa-trash"></i>';

  li.appendChild(checkbox);
  li.appendChild(span);
  li.appendChild(deleteBtn);
  taskList.appendChild(li);

  saveTasks(); // Save tasks to localStorage
}
  1. Accessibility Inclusivity was a priority in this app. We ensured:

ARIA Attributes: Proper roles and labels make the app screen-reader friendly.
Keyboard Navigation: All interactive elements are focusable and usable via the keyboard.
Example:

<input type="text" id="task-input" placeholder="Add a new task..." aria-label="Add a new task">
  1. Notifications To provide feedback for user actions, we implemented a notification system. Notifications inform users when tasks are added, deleted, or completed.
function showNotification(message, type = 'info') {
  const notification = document.createElement('div');
  notification.classList.add('notification', `notification-${type}`);
  notification.textContent = message;

  document.body.appendChild(notification);

  // Display the notification with animation
  notification.classList.add('show');

  // Remove after 3 seconds
  setTimeout(() => notification.remove(), 3000);
}

How We Enhanced the UX
Drag-and-Drop: Enabled with SortableJS, users can reorder tasks by dragging them.
Filters: Quickly view "Active," "Completed," or "All" tasks.
Local Storage: Tasks persist across sessions, giving users peace of mind.
Subtle Animations: Elements smoothly transition into place, providing a polished experience.
Try It Yourself
🔗 Live Demo on CodePen: https://codepen.io/HanGPIIIErr/pen/poMYBwV

Conclusion
This Interactive Premium To-Do List combines functionality and aesthetics to deliver an engaging task management solution. By integrating modern web design principles, accessibility, and local storage, we’ve built a tool that stands out in both form and function.

🚀 Discover More
Explore Gladiators Battle: Dive into innovative web experiences and epic games at https://gladiatorsbattle.com.

Join our community:

Twitter: https://x.com/GladiatorsBT
GitHub: https://github.com/your-repo
Take your productivity and creativity to the next level—whether you're planning tasks or creating immersive projects!

Image of Docusign

Bring your solution into Docusign. Reach over 1.6M customers.

Docusign is now extensible. Overcome challenges with disconnected products and inaccessible data by bringing your solutions into Docusign and publishing to 1.6M customers in the App Center.

Learn more

Top comments (0)