Add the selector to your html file: byte-this-google-font-selector-input.Import ByteThisNgxGoogleFontsModule into your module: any module which will use the component must import our library module.Install or if you prefer, clone the Git repo and include everything directly within your project.Google's Google Fonts Developer API page can walk you through this process. Get a Google API Key: if you haven't already done so, you will need to create a Google account and get an API key.To get started now: you can directly install via npm: GitHub Project to view the source code and create forks.Npm Package to directly instlal and use.The project is open source and is available on: This is a pure Angular implementation there are no imports for jQuery, bootstrap, etc. The fonts will always appear in alphabetical order. The user can type the first few characters of a name, and the list will update to the fonts which begin with that prefix. This interface element also contains web-safe fonts. The ngx-google-fonts package contains functionailty for loading, rendering, and allowing the user to select google fonts via drop-down interface. If a hover is no longer happening, this will reset to some default value. It will dynamically update as the hover event changes. This paragraph is rendered with the font currently being hovered over in the input element above. Try it out with a few different selections and observe how it behaves: Loading fonts. It takes care of loading the list of fonts, presenting them on click, and dynamically lazy-loading each font as it comes into view. The component below is a preview of the font selector. In the sections below, I'll outline how to get started with using this component, then outline the behavior and customizability in more detail.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |