Cards
Versatile content containers with headers, footers, images, actions, and interactive features.
Basic Cards
Header + Body + Footer
This card has all three sections: header, body, and footer.
Body Only
A simple card with just a body section.
Header + Body
Card with header and body, no footer.
Card Styles
Flat
No border, subtle shadow.
Elevated
No border, medium shadow.
Bordered
Border visible, no shadow.
Hover
Shadow appears on hover.
Clickable
Pointer cursor with hover/active shadow.
Accent Bars — Left (Default)
Primary
Left accent bar.
Secondary
Left accent bar.
Success
Left accent bar.
Danger
Left accent bar.
Warning
Left accent bar.
Info
Left accent bar.
Dark
Left accent bar.
Light
Left accent bar.
Accent Bars — Other Sides
Add .lp-card--accent-{right|top|bottom} to change the accent bar position.
Left
Default position.
Right
Right accent bar.
Top
Top accent bar.
Bottom
Bottom accent bar.
Corner Accents
Add .lp-card--corner-accent-{tl|tr|bl|br} for a colored corner mark.
Top Left
Corner accent.
Top Right
Corner accent.
Bottom Left
Corner accent.
Bottom Right
Corner accent.
Edge Accents
Add .lp-card--accent-edge to place a flush partial bar on the card edge (no inset, no rounding).
Left Edge
Flush left bar.
Right Edge
Flush right bar.
Top Edge
Flush top bar.
Bottom Edge
Flush bottom bar.
Border Variants
Full 1px colored border with .lp-card--border-{color}.
Primary
Secondary
Success
Danger
Warning
Info
Dark
Light
Thick Border Variants
Full 3px colored border with .lp-card--thickborder-{color}.
Primary
Secondary
Success
Danger
Warning
Info
Dark
Light
Background Color Cards
Full card color with .lp-card--bg-{color}.
Primary
Full background color card.
Secondary
Full background color card.
Success
Full background color card.
Danger
Full background color card.
Warning
Full background color card.
Info
Full background color card.
Dark
Full background color card.
Light
Full background color card.
Header Colors
Solid header background with .lp-card--header-{color}.
Primary
Colored header card.
Secondary
Colored header card.
Success
Colored header card.
Danger
Colored header card.
Warning
Colored header card.
Info
Colored header card.
Dark
Colored header card.
Light
Colored header card.
Soft Header Colors
Subtle header background with .lp-card--header-soft-{color}.
Primary
Soft header card.
Secondary
Soft header card.
Success
Soft header card.
Danger
Soft header card.
Warning
Soft header card.
Info
Soft header card.
Dark
Soft header card.
Light
Soft header card.
Borderless Sections
Header Borderless
No header bottom border.
Both Borderless
No section borders at all.
Spacing Modes
Compact
Reduced padding for dense layouts.
Default
Standard padding.
Spacious
Extra breathing room.
Footer Alignment
Start
Center
End
Between
Cards with Images
Image Top
Image placed above the card body.
Image Bottom
Image placed below the card body.
Horizontal Card
Horizontal Layout
Image on the left, content on the right. Stacks vertically on mobile.
Image Overlay
Card Group
Side-by-side cards with .lp-card-group.
Card One
First card in group.
Card Two
Second card in group.
Card Three
Third card in group.
Overflow Visible
Add .lp-card--overflow-visible when child elements (dropdowns, datepickers) need to overflow.
Overflow Visible
Dropdowns and floating elements can overflow this card boundary.
Collapsible Cards
Use data-lp-action="collapse" on a button in the header actions.
Collapsible Card
Click the collapse button to hide this content. Click again to show it.
Card Actions
Combine multiple actions: collapse, refresh, fullscreen, close.
All Actions
This card demonstrates all four action buttons. Try each one:
- Collapse — hides body and footer
- Refresh — shows loading spinner
- Fullscreen — fills the viewport (ESC to exit)
- Close — removes with confirmation
Refresh Only
This card only has a refresh button. Click to see the loading spinner overlay.
Draggable Cards
Drag-and-drop reordering with data-lp-component="dragdrop". Uses .lp-drag-handle and persists order to localStorage.
Card 1
Drag this card by the handle to reorder.
Card 2
Order is saved to localStorage.
Card 3
Refresh the page to see persisted order.
Card 4
Each card combines drag-and-drop with card actions.
CSS Reference
| Class | Description |
|---|---|
.lp-card | Base card container |
.lp-card-header | Card header section |
.lp-card-header-title | Title text in header |
.lp-card-header-actions | Action buttons area in header |
.lp-card-action-btn | Individual action button |
.lp-card-body | Card body/content section |
.lp-card-footer | Card footer section |
.lp-card-footer--{start|center|end|between} | Footer alignment |
.lp-card-img | Card image |
.lp-card-img--top | Image at top with rounded corners |
.lp-card-img--bottom | Image at bottom with rounded corners |
.lp-card--flat | No border, subtle shadow |
.lp-card--elevated | No border, medium shadow |
.lp-card--bordered | Border, no shadow |
.lp-card--hover | Shadow on hover |
.lp-card--clickable | Pointer cursor with hover/active shadow |
.lp-card--{color} | Left accent border (primary, secondary, success, danger, warning, info, dark, light) |
.lp-card--border-{color} | Full 1px colored border |
.lp-card--thickborder-{color} | Full 3px colored border |
.lp-card--bg-{color} | Full background color card |
.lp-card--header-{color} | Solid header background color |
.lp-card--header-soft-{color} | Subtle header background color |
.lp-card--header-borderless | Remove header bottom border |
.lp-card--footer-borderless | Remove footer top border |
.lp-card--borderless-sections | Remove both section borders |
.lp-card--compact | Reduced padding |
.lp-card--spacious | Increased padding |
.lp-card--overflow-visible | Allow child overflow |
.lp-card--horizontal | Horizontal layout (image + content) |
.lp-card-content | Content wrapper for horizontal layout |
.lp-card--has-overlay | Card with image overlay |
.lp-card-overlay | Gradient overlay on image |
.lp-card-group | Flex container for grouped cards |
.lp-card--loading | Loading state with spinner overlay |
.lp-card--fullscreen | Fullscreen state |
.lp-card--collapsed | Collapsed state (hides body/footer) |
data-lp-component="card" | Auto-init card JS component |
data-lp-action="collapse" | Toggle collapse on click |
data-lp-action="refresh" | Trigger refresh/loading on click |
data-lp-action="fullscreen" | Toggle fullscreen on click |
data-lp-action="close" | Close card on click |
data-lp-confirm="msg" | Confirmation dialog before close |
data-lp-component="dragdrop" | Auto-init drag-drop on container |
.lp-drag-handle | Drag handle element |