search ESC

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 Top

Image placed above the card body.

Image Bottom

Image placed below the card body.

Image Bottom
Horizontal Card
Horizontal
Horizontal Layout

Image on the left, content on the right. Stacks vertically on mobile.

Image Overlay
Overlay
Overlay Title

Content appears over the image with a gradient background.

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
ClassDescription
.lp-cardBase card container
.lp-card-headerCard header section
.lp-card-header-titleTitle text in header
.lp-card-header-actionsAction buttons area in header
.lp-card-action-btnIndividual action button
.lp-card-bodyCard body/content section
.lp-card-footerCard footer section
.lp-card-footer--{start|center|end|between}Footer alignment
.lp-card-imgCard image
.lp-card-img--topImage at top with rounded corners
.lp-card-img--bottomImage at bottom with rounded corners
.lp-card--flatNo border, subtle shadow
.lp-card--elevatedNo border, medium shadow
.lp-card--borderedBorder, no shadow
.lp-card--hoverShadow on hover
.lp-card--clickablePointer 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-borderlessRemove header bottom border
.lp-card--footer-borderlessRemove footer top border
.lp-card--borderless-sectionsRemove both section borders
.lp-card--compactReduced padding
.lp-card--spaciousIncreased padding
.lp-card--overflow-visibleAllow child overflow
.lp-card--horizontalHorizontal layout (image + content)
.lp-card-contentContent wrapper for horizontal layout
.lp-card--has-overlayCard with image overlay
.lp-card-overlayGradient overlay on image
.lp-card-groupFlex container for grouped cards
.lp-card--loadingLoading state with spinner overlay
.lp-card--fullscreenFullscreen state
.lp-card--collapsedCollapsed 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-handleDrag handle element