Either way it's phonetic; it's not based on either the radicals or the strokes. Even though there are input methods that use those, they are not commonly used.
There are other input methods such as Cangjie or Sucheng which are also popular in Taiwan and Hong Kong. They have much faster WPM since they are based on the structure of the characters. Pre-smartphone there was a Q9 input method with one stroke mapped to each of 8 numbers and a wildcard for if you forgot.
In mainland China, it’s pinyin, but in Taiwan, they often use Bopomofo: https://en.m.wikipedia.org/wiki/Bopomofo