Skip to content
Back to skills

degallery-react

ASecurity

Add DeGallery galleries to React applications using @degallery/react, GalleryProvider, Gallery, Asset, or useGallery. Use when integrating DeGallery into React or Next.js UI.

  • 0 votes
  • 0 copies
  • 2 views
  • Added November 7, 2026
developmentbashreactnextjsnodeapi

Works with

  • cli
  • api

Security analysis

A96/100
  • mediumInstalls packages at runtime which could introduce malicious dependencies

Pro shows the line behind each finding and how to fix it

Scanned November 7, 2026

npx -y skills add mmpotulo28/degallery-skills --skill degallery-react --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of degallery-react?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for degallery-react
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/mmpotulo28-degallery-react/badge)](https://www.skillsdirectory.com/skills/mmpotulo28-degallery-react)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: degallery-react
description: Add DeGallery galleries to React applications using @degallery/react, GalleryProvider, Gallery, Asset, or useGallery. Use when integrating DeGallery into React or Next.js UI.
---

# DeGallery React integration

`@degallery/react` provides React gallery components and hooks. It uses `@degallery/sdk` and TanStack Query. The package supports React 19; in frameworks such as Next.js, put the provider behind a client component boundary.

## Install

```bash
pnpm add @degallery/react @degallery/sdk @tanstack/react-query
```

## Configure the provider

```tsx
'use client';

import { GalleryProvider } from '@degallery/react';

export function Providers({ children }: { children: React.ReactNode }) {
  return (
    <GalleryProvider
      apiUrl="https://api.degallery.dev"
      publishableKey={process.env.NEXT_PUBLIC_DEGALLERY_KEY}
    >
      {children}
    </GalleryProvider>
  );
}
```

Only use a publishable key in browser code, and only for its permitted public content scope. Never pass a private API key or delivery-signing secret to `GalleryProvider`. For private content, resolve authorization on the server and provide a scoped, short-lived read token or a safe server-resolved payload.

## Render a gallery

Render a preloaded payload:

```tsx
import { Gallery } from '@degallery/react';
import type { GalleryViewData } from '@degallery/react';

export function ProductGallery({ gallery }: { gallery: GalleryViewData }) {
  return <Gallery gallery={gallery} layout="Masonry" />;
}
```

Or load by gallery ID/slug through the provider:

```tsx
import { Gallery } from '@degallery/react';

export function PublishedGallery({ galleryId }: { galleryId: string }) {
  return <Gallery galleryId={galleryId} layout="Grid" />;
}
```

Supported layouts include `Grid`, `Masonry`, `Justified`, `Single`, `Carousel`, and `Stack`. The component provides loading, error, empty, and pagination behavior; consult the current docs before relying on specific defaults or customization props.

## Custom rendering

- Use `Asset` for an individual gallery item with DeGallery image behavior.
- Use `useGallery` when the app needs resolved gallery state, loading/refetch behavior, or custom lightbox composition.
- Supply alt text and keep custom controls keyboard-accessible.

See the [React gallery guide](https://docs.degallery.dev/docs/react/gallery) and [provider configuration](https://docs.degallery.dev/docs/react/provider) for current APIs. For private content and credentials, use `degallery-auth-and-private-media`.

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.