Skip to main content

links

Defines <link> tags to be inserted into the document <head> for a route. Commonly used for stylesheets, favicons, and other resource hints.

Signature

LinkDescriptor[]
An array of link descriptor objects. Each descriptor becomes a <link> element in the document head.

Basic Example

Multiple Stylesheets

External Resources

Prefetch and Preload

Favicons and Icons

Manifest and Theme

Canonical URLs

Media Queries

TypeScript Type

Combining with Parent Routes

Best Practices

Import CSS files with the ?url suffix to get the URL:
Use preload for resources needed immediately:
Only include styles needed for the current route:

See Also