@molecule/app-note-card-solid

Feature · note-card · App (browser) · v1.1.3 · Apache-2.0

Sticky-note style card with color, body, optional pin/archive actions

npm install @molecule/app-note-card-solid

npm · Source on GitHub

How it works

@molecule/app-note-card-solid is a ready-made note-card feature for the app (browser) side. It composes the core interfaces it needs, so it works with whichever providers your app has bonded.

import { NoteCard } from '@molecule/app-note-card-solid'

declare function openNote(): void
;<NoteCard
  title="Meeting notes"
  body="Follow up with design team on the new dashboard layout."
  color="#fef9c3"
  pinned
  modifiedAt="Jun 5, 2026"
  onClick={openNote}
/>

Works with: @molecule/app-solid, @molecule/app-ui, @molecule/app-ui-solid

Reference

Solid sticky-note style card.

Exports NoteCard — the Solid counterpart of @molecule/app-note-card-react's NoteCard: the same props (React names), the same ClassMap styling, and the same DOM for the same input.

Auto-generated, AI-first package reference for the molecule.dev ecosystem. It is written to be read by coding agents as much as by people, and is generated from this package's source — edit src/index.ts JSDoc, not this file.

Quick Start

import { NoteCard } from '@molecule/app-note-card-solid'

declare function openNote(): void
;<NoteCard
  title="Meeting notes"
  body="Follow up with design team on the new dashboard layout."
  color="#fef9c3"
  pinned
  modifiedAt="Jun 5, 2026"
  onClick={openNote}
/>

Type

feature

Installation

npm install @molecule/app-note-card-solid @molecule/app-solid @molecule/app-ui @molecule/app-ui-solid solid-js

API

Interfaces

NoteCardProps

Props for NoteCard.

interface NoteCardProps {
  /** Note title. */
  title?: JSX.Element
  /** Note body text. */
  body: JSX.Element
  /**
   * Background tint (CSS colour). The documented note tints (yellow
   * `#fef9c3`, green `#dcfce7`, blue `#dbeafe`, red `#fee2e2`, amber
   * `#fef3c7`) render as the theme's light tint of their tone; a colour
   * with no tone is data, applied as given.
   */
  color?: string
  /** Optional pin / starred indicator. */
  pinned?: boolean
  /** Optional last-modified display. */
  modifiedAt?: JSX.Element
  /** Optional right-side actions (edit, archive, delete). */
  actions?: JSX.Element
  /**
   * Activates the card: while it is set, an empty, transparent native button
   * covers the whole card and calls this on click — Enter and Space included,
   * natively, since the control is a real button. The button is named by the
   * title when there is one, else the body. The card's other controls (the
   * `actions` slot) sit above that button and keep their own clicks, so they
   * do not fire this.
   */
  onClick?: () => void
  /** Extra classes. */
  className?: string
}

Functions

NoteCard(props)

Sticky-note style card with optional color tint, pinned indicator, and bottom-right actions. Use for note-taking apps, digital post-its, dashboard quick-notes.

The card's paper is a theme tone: the documented note tints (yellow #fef9c3, green #dcfce7, blue #dbeafe, red #fee2e2, amber #fef3c7) render as the theme's light tint of the matching tone, so the card and its text (the theme's ink) follow the app theme. A color with no tone is data: it is applied as given, over the tone's paper. The accessible label of the pin indicator is the string React renders (t('noteCard.aria.pinned', undefined, { defaultValue: 'Pinned' })), read through useTranslation() so it follows a locale switch.

function NoteCard(props: NoteCardProps): JSX.Element
  • props — Component props (see NoteCardProps).

Returns: The rendered note card.

Injection Notes

Requirements

Peer dependencies:

  • @molecule/app-solid ^3.14.0 || ^4.0.0
  • @molecule/app-ui ^1.4.0
  • @molecule/app-ui-solid ^1.1.0
  • solid-js ^1.8.0

Runtime Dependencies

  • @molecule/app-solid
  • @molecule/app-ui
  • @molecule/app-ui-solid
  • solid-js

Requires a wired ClassMap bond — getClassMap() throws before wiring.

The card's paper is a theme tone: the documented note tints (yellow #fef9c3, green #dcfce7, blue #dbeafe, red #fee2e2, amber #fef3c7) render as the theme's light tint of the matching tone, so the card and its text (the theme's ink) follow the app theme. A color with no tone is data: it is applied as given, over the tone's paper.

onClick makes the whole card clickable through a transparent native button over it — Enter and Space included, natively — named by the title when there is one, else the body; the card's inner controls (the actions slot) sit above it and keep their own clicks.

Translations

Translation strings are provided by @molecule/app-locales-note-card.