cloudinary-community / next-cloudinary

⚡️ High-performance image delivery and uploading at scale in Next.js powered by Cloudinary.
https://next.cloudinary.dev
MIT License
252 stars 74 forks source link

[Feature] Nested Overlays #79

Open colbyfayock opened 1 year ago

colbyfayock commented 1 year ago

Feature Request

Is your feature request related to a problem? Please describe.

Cloudinary gives you the ability to "nest" overlays in a way that allows the elements to flow in a natural way.

Example would be based on dynamic text positioning, the nested overlay would dynamically be placed after it if using relative positioning.

Describe the solution you'd like

Not quite sure, thinking maybe along the lines of:

overlays={[
  {
    ...
    children: [{ ...overlays }]
]}

Where the children would be instances of overlays, so the overlays plugin would just recursively parse the children and down

Describe alternatives you've considered

maybe childOverlays instead?

colbyfayock commented 1 year ago

I explain nesting in this step: https://spacejelly.dev/posts/how-to-generate-personalized-social-media-cards-for-landing-pages-with-next-js-cloudinary/#step-3-dynamically-adding-images-and-text-overlays-to-a-cloudinary-image