@molecule/app-note-card-react

Feature · note-card · App (browser) · v4.1.1 · Apache-2.0

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

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

npm · Source on GitHub

How it works

@molecule/app-note-card-react 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-react'

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-react, @molecule/app-ui, @molecule/app-ui-react

Reference

Sticky-note style card.

Exports <NoteCard>.

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-react'

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-react @molecule/app-react @molecule/app-ui @molecule/app-ui-react react
npm install -D @types/react

API

Interfaces

NoteCardProps

Props for NoteCard.

interface NoteCardProps {
  /** Note title. */
  title?: ReactNode
  /** Note body text. */
  body: ReactNode
  /**
   * 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?: ReactNode
  /** Optional right-side actions (edit, archive, delete). */
  actions?: ReactNode
  /**
   * 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.

function NoteCard({
  title: titleProp,
  body,
  color,
  pinned,
  modifiedAt,
  actions: actionsProp,
  onClick,
  className,
}: NoteCardProps): JSX.Element
  • props — Component props (see NoteCardProps).

Injection Notes

Requirements

Peer dependencies:

  • @molecule/app-react ^4.13.0 || ^5.0.0
  • @molecule/app-ui ^1.4.0
  • @molecule/app-ui-react ^4.4.0
  • react ^18.0.0 || ^19.0.0

Runtime Dependencies

  • @molecule/app-react
  • @molecule/app-ui
  • @molecule/app-ui-react
  • react

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.