🚀 Socket Launch Week Day 5:Introducing Repository Access Permissions and Custom Roles.Learn more
Sign In

km-card-layout-core

Package Overview
Dependencies
Maintainers
1
Versions
29
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

km-card-layout-core

Shared render helpers for CardLayout layout JSON (binding resolution, layout normalization).

latest
npmnpm
Version
0.1.32
Version published
Weekly downloads
24
118.18%
Maintainers
1
Weekly downloads
 
Created
Source

km-card-layout-core

Utilities for working with card layout schemas: sanitize layouts, handle bindings, convert style units, and apply background/decoration helpers. Rendering now uses CardElement directly without intermediate RenderNode conversion.

API

  • normalizeLayout(layout): sanitize layout objects and fill defaults.
  • resolveBindingValue(path, data, context?): read bound data with optional context.
  • styleObjectToString(style, unit?): convert a style object to a CSS string.
  • addUnit(value, unit): append px/rpx to numbers or numeric strings.
  • Background helper: backgroundChange to apply template background colors.

Usage

Use the layout schema and card elements directly for rendering on web or mini-program targets—no extra RenderNode transformation layer is required. The core is platform-agnostic and can be imported via require('km-card-layout-core').

FAQs

Package last updated on 26 May 2026

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