categories: Array of font categories to include in the list. families: If only specific fonts shall appear in the list, specify their names in an array. Example: If the options object is, use #font-picker-main and. pickerId: If you have multiple font pickers on your site, you need to give them unique IDs which must be appended to the pickers' id attributes and the. options: Object with additional optional parameters:.defaultFamily: Font that is selected on initialization.When the user selects a font, it will automatically be downloaded and applied to all HTML elements with the "apply-font" class.Ĭustomization ParametersThe following parameters can be passed to the constructor of the FontPicker class:Ĭonst fontPicker = new FontPicker(apiKey, defaultFamily, options, onChange) This is where the font picker will be generated.Īdd the class "apply-font" to all HTML elements you want to apply the selected font to.
0 Comments
Leave a Reply. |