On my Drupal 11 installation I try to:
composer require 'drupal/back_to_top:^3.0'
And get the following error:
Your requirements could not be resolved to an installable set of packages.
Problem 1
- Root composer.json requires drupal/back_to_top ^3.0 -> satisfiable by drupal/back_to_top[3.0.0, 3.0.1, 3.0.2].
- drupal/back_to_top[3.0.0, ..., 3.0.2] require drupal/core ^8 || ^9 || ^10 -> found drupal/core[8.0.0, ..., 8.9.20, 9.0.0, ..., 9.5.11, 10.0.0, ..., 10.4.0] but the package is fixed to 11.0.9 (lock file version) by a partial update and that version does not match. Make sure you list it as an argument for the update command.
Use the option --with-all-dependencies (-W) to allow upgrades, downgrades and removals for packages currently locked to specific versions.
Add version 11 on modules composer.json file.
Active
3.0
Code