Skip to content
Hekana Spray
Documentation
Getting started
Theme development
Components and tags

Localization

Apps and custom code

Examples and recipes
API reference
Publishing
Build apps
AI development

<hk-card>

hk-card: A box with background, radius, padding, border and shadow around its content. Syntax, props, defaults and examples.

On this page

A box with background, radius, padding, border and shadow around its content.

Group: Layout and structure. Name in the editor: Card. Complete props for every tag: Tag reference.

Syntax

html
<hk-card>
  …
</hk-card>

Children: Any content: elements, hk-* tags and text.

Props

Write props as kebab-case attributes.

PropTypeRequiredDefaultAllowed valuesEditor label
backgroundcolorno--Background
radiusnumberno120 to 64Radius
padding (responsive)numberno160 to 96Padding
borderbooleannofalse-Border
shadowselectnononenone, sm, md, lgShadow

Responsive props: padding. Each also takes a tablet- and a mobile- prefix.

Required props

None. Every prop has a default or can be left out.

Examples

From docs/examples/example-store/blocks/quote.snf, lines 1 to 6:

html
<hk-card border="true" padding="20" radius="16">
  <hk-stack gap="10">
    <p class="quote">{{ block.settings.text }}</p>
    <hk-text text="{{ block.settings.author }}" size="14" color="#4B5563" />
  </hk-stack>
</hk-card>

From docs/examples/example-store/sections/feature-row.snf, lines 5 to 10:

html
<hk-card border="true" padding="24" radius="16">
  <hk-stack gap="8">
    <hk-heading text="{{ section.settings.one_title }}" level="h3" size="20" />
    <hk-text text="{{ section.settings.one_text }}" size="15" color="#4B5563" />
  </hk-stack>
</hk-card>
  • hk-image: An image with alt text, dimensions, aspect ratio, fit, loading mode and radius.
  • hk-heading: A heading with a level, size, alignment and colour.
  • hk-text: A paragraph of plain text with size, alignment and colour.
  • hk-button: A button or link with a label, destination, variant, size and optional icon.
  • hk-section: A full-width band of the page with its own background and vertical padding.
  • hk-container: Centres its content and limits it to a maximum width with horizontal padding.
  • hk-stack: Lays its children out in a row or a column with a gap, alignment and wrapping.
  • hk-grid: A responsive grid of columns with a gap and an optional minimum item width.
  • hk-section-group: Marks where a shared section group (header, footer, announcement) sits in a layout.

Next steps