Dasar UI Library

Card

Cards contain content and actions about a single subject. They provide a flexible and extensible content container with multiple variants and slots.
Appearance
Elevated Card

This is the default card appearance with a subtle shadow to lift it off the page.

Outline Card

This card uses a border instead of a shadow for a flatter, cleaner look.

Borderless Card

This card has no border or shadow, useful for grouping content in an existing container.

Spacing
Normal Spacing

This card uses the standard padding across its header, body, and actions.

Compact Spacing

This card reduces the padding, making it ideal for dense data displays or smaller sidebars.

Content Slots
User Profile
Manage your personal information and security.

Your account is currently active. Please review your security settings to ensure maximum protection.

Closable & Extra Header
Dismissible Notification
System Alert

This card can be dismissed by clicking the X icon in the header.

Task Status
Completed

We provide an extra header slot for badges, toggles, or secondary action menus.

Edge-to-Edge Media
Image Placeholder

Beautiful Scenery

By combining hideOverflow and bodyFluid, you can create edge-to-edge media cards.

Border Radius
Radius None

Square corners.

Radius Medium

Default rounded corners.

Radius Extra Large

Highly rounded corners.

Custom Styling & Layouts
Hero
Card with Image Header
Because headerFluid is true, the image touches the top edges.
Recent Users
Users who logged in recently
  • Alice Johnson
  • Bob Smith
  • Charlie Davis
Pro Plan
$19/mo
Includes all premium features.
Mechanical Keyboard$99.00
Keyboard
Total Revenue
$45,231
+12.5% from last month
Action Required

Your subscription is about to expire in 3 days. Please update your billing information to avoid service interruption.

Jane Doe
Senior Developer
Passionate about building scalable frontend applications and mentoring junior developers.

API Reference

Property
Type
Default
Description
appearance'outline' | 'borderless' | 'elevated' 'elevated' Defines the structural shadow and border style of the card.
spacing'normal' | 'compact' 'normal' Controls the inner padding scale of the card.
radiusScaleAttributeType 'lg' Sets the border radius of the card.
size'sm' | 'md' | 'lg' 'md' Controls the typographic scale inside the card.
labelstring undefined Sets a simple string title for the header section.
closableboolean false Displays a dismiss icon in the header. Emits (onClose) when clicked.
hide-overflowboolean false Applies overflow hidden. Great for embedding edge-to-edge images.
full-widthboolean false Forces the host element to width 100% using flex display.
fluid / ...-fluidboolean false Removes padding from the entire card (fluid) or specific sections (header-fluid, body-fluid, etc.).
...-class / ...-stylestring | object null Custom class or style injection for sections like container, header, body, extra-header, action.
(onClose)EventEmitter<void> - Emitted when the close icon is clicked (requires closable=true).
[header-slot]Content Slot - Replaces the default label with custom HTML content.
[caption-slot]Content Slot - Injects small descriptive text below the title.
[extra-header-slot]Content Slot - Injects elements to the far right of the header (like badges or menus).
[action-slot]Content Slot - Injects footer action elements (like buttons) into a flex container.