google-fonts-dropdown
v1.0.4
Published
A React component for selecting Google Fonts, compatible with React, Next.js, and Remix.
Downloads
81
Maintainers
Readme
Google Fonts Dropdown
** Google Fonts Dropdown ** A simple React component for selecting Google Fonts, compatible with React, Next.js, and Remix.
Features
- Feature 1: Dropdown to select Google Fonts.
- Feature 2: tailwind support.
Installation
To install the package, use npm or Yarn:
npm i google-fonts-dropdown
import React from "react";
import GoogleFontsDropdown from "google-fonts-dropdown";
const MyComponent: React.FC = () => {
const handleFontSelect = () => {
console.log("Selected Font:", font);
};
return (
<form>
<GoogleFontsDropdown
apiKey="YOUR_GOOGLE_FONTS_API_KEY"
className=""
name="font"
title="select a font"
onFontSelect={handleFontSelect}
/>
<button type="submit">Submit</button>
</form>
);
};
export default MyComponent;