Socket
Book a DemoInstallSign in
Socket

@gyldendal/kobber-scene

Package Overview
Dependencies
Maintainers
8
Versions
95
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@gyldendal/kobber-scene

Components for rendering scene objects from Gyldendal's CMS.

0.6.2
latest
Source
npmnpm
Version published
Weekly downloads
182
-14.55%
Maintainers
8
Weekly downloads
 
Created
Source

Kobber scene

Components for rendering scene objects from Gyldendal's CMS.

See Scene.stories.tsx for examples.

Can be imported as web components or react components:

@gyldendal/kobber-scene/web-components
@gyldendal/kobber-scene/react

CMS data

Enums that match data from CMS are defined in types.ts

Calculate padding

Pass CMS-data and other variables through the calculatePadding-function and pass it to kobber-scene-boundary to apply css paddings.

import { calculatePadding } from '@gyldendal/kobber-scene/web-components';

const padding = calculatePadding({
  cmsWhiteSpace: sceneFromCms.sceneWhitespace,
  cmsHorizontalAlignment: sceneFromCms.sceneHorizontalAlignments
});
<kobber-scene>
  <kobber-scene-boundary padding=${JSON.stringify(padding)}>
    ...
  </kobber-scene-boundary>
</kobber-scene>

Optional presentation logic

The following rules are applied to thousands of scenes in Skolestudio:

  • The sections sc-feature-header and sc-card-carousel are displayed in full width
  • sc-feature-header affects the wrapping row's bottom padding
  • Dynamic contents are displayed in full width and full height if there is no other content in the scene
  • Dynamic contents are displayed in full width if there is no other content in the row

To apply the same rules, pass scene.rows through groupRowsByPresentation and render each rowGroup as in Skolestudio.

FAQs

Package last updated on 26 Aug 2025

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

About

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.

  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc

U.S. Patent No. 12,346,443 & 12,314,394. Other pending.