Dev Design Library

Font Loader

The FontLoader component is used to load fonts from a provided URL. It creates a link element with the given URL and appends it to the document head. This component is a memoized functional component that uses the useEffect hook to ensure that the link element is only created once and appended to the document head when the component mounts.

Font Loader preview
Library
Lobe UI
Framework
React
Type
component
License
MIT
Install
pnpm add @lobehub/ui
Files
  • src/FontLoader/index.tsx
Source
https://github.com/lobehub/lobe-ui

Categories

More from Lobe UI