UNPKG

nextjs-link-preview

Version:

A simple, lightweight Next.js component for displaying beautiful link preview cards with preset image support

38 lines 1.14 kB
/** * Simple Link Preview Component * * Usage with custom image: * <LinkPreview * url="https://example.com" * title="Example" * description="Example description" * image="https://example.com/image.png" * /> * * Usage with preset: * <LinkPreview * url="https://github.com/user/repo" * title="My Repo" * description="A cool repository" * preset="github" * /> */ import React from "react"; export type LinkPreviewSize = "small" | "medium" | "large"; export type LinkPreviewLayout = "vertical" | "horizontal"; export type LinkPreviewPreset = "github" | "npm"; export interface LinkPreviewProps { url: string; title: string; description?: string; image?: string; preset?: LinkPreviewPreset; size?: LinkPreviewSize; layout?: LinkPreviewLayout; width?: string | number; height?: string | number; className?: string; } export declare function LinkPreview({ url, title, description, image, preset, size, layout, width, height, className }: LinkPreviewProps): React.JSX.Element; export default LinkPreview; //# sourceMappingURL=LinkPreview.d.ts.map