Cover

A component for displaying a cover image with an interactive picker.

Installation

pnpm add @notion-kit/ui

Examples


Notion Cover

Cover Picker

API Reference

Cover

PropTypeDefaultDescription
unsplashAPIKey*string-The Unsplash access key from Unsplash Developers.
urlstring-The current URL of the cover image (controlled).
altstring-The fallback text to display.
onSelect(url: string) => void-Handler that is called when a cover image is selected or when a URL is submitted.
onUpload(file: File) => void-Handler that is called when a cover image is submitted.
onRemove() => void-Handler that is called when the remove button is clicked.

CoverPicker

PropTypeDefaultDescription
unsplashAPIKey*string-The Unsplash access key from Unsplash Developers.
onSelect(url: string) => void-Handler that is called when a cover image is selected or when a URL is submitted.
onUpload(file: File) => void-Handler that is called when a cover image is submitted.
onRemove() => void-Handler that is called when the remove button is clicked.