NOTE CARD: Compact left-border-accent tw-card for pinned notes and comments
VARIANTS: Default | Color accents (primary, blue, green, red, orange, magenta, neutral) | Compact (.note-sm)
Used in drawer panels, record sidebars, and timeline detail areas to display notes, comments, and pinned observations. Left border colour distinguishes note categories. Icon is optional and renders inline with text.
Base: Left-border accent in primary colour. Icon is placed inline inside .note-text, flowing naturally with the text.
Card has hover and focus-visible states for interactivity. Use <time> for timestamps.
<div class="tw-note" tabindex="0"><div class="tw-note-content"><div class="tw-note-text"><i class="fa-regular fa-file-lines tw-note-icon"></i> Text...</div><div class="tw-note-meta">Author · <time datetime="...">...</time></div></div></div>
No icon: Simply omit the <i> element. The note renders cleanly with just text and metadata.
<div class="tw-note"><div class="tw-note-content"><div class="tw-note-text">Text only...</div><div class="tw-note-meta">...</div></div></div>
Accents: Add a colour modifier class alongside .note to change the left-border accent.
Default is primary (dark blue). Colours follow the avatar/timeline palette.
<div class="tw-note tw-note-green">...</div>
Wrapping: In narrow containers, the icon stays inline on the first line while text wraps naturally below.
max-w-xs (320px) to demonstrate wrapping behaviour.
Compact: Tighter spacing and smaller text for drawer panels and narrow sidebars.
Add .note-sm alongside .note.
<div class="tw-note tw-note-sm" tabindex="0">...</div>
Example: Typical usage inside a record sidebar with a section header and multiple notes.
Empty: When no notes exist, show a helpful message with an optional action.
No notes yet