import is widely used in many programming languages (even sometimes in an alternative form), here with the link, it's both used in css pre-processor and for frameworks like React and Vue as well. So that yes, they're mainly used within files related to that specific code platform to be included in programming context.
And for your consequent questions, these import statements preferably used on that specific part of the project page, like component mentality as almost the same with design systems. For more appropriate words, it allows users to import whatever part of this library or design system instead of copying all of these features of that specific content within the imported file scope.
Also as you mentioned with your question, it's not something necessarily displayed on that page for
npm and when it's imported, it directly comes from another source (that's the code repository). So that even you copy this statement from the displayed webpage, there's no direct connection between these sources and the user should install these libraries as well beforehand in order to successfully importing these libraries.
Lastly, there's a good usage of both the design and code displanation within the same place with Vuetify library, works like a plugin to Vue framework you mentioned. Hope the answer helps and please don't hesitate to edit your question to let me edit mine, or comment as wishing me to explain more.