The Card component provides a flexible container for organizing content with optional icon, title, and support for both horizontal and vertical layouts.Documentation Index
Fetch the complete documentation index at: https://mintlify.com/devscribe-team/webeditor/llms.txt
Use this file to discover all available pages before exploring further.
Node specification
The card is a block-level node that can contain other block content.The heading text displayed in the card
Lucide icon name to display in the card (e.g., “FileText”, “Book”, “Star”)
Whether to display the icon
Layout orientation.
false for vertical (icon on top), true for horizontal (icon on left)Optional URL to make the entire card clickable as a link
Usage
Insert via command menu
Type/card in the editor and select the Card option from the command menu. The card will be inserted with a default title and icon.
Insert via input rule
Type<card followed by optional attributes:
Programmatic insertion
Use theinsertCard function to insert a card programmatically:
Attributes
The card node spec defines the following attributes:Layout modes
The card supports two layout orientations:Vertical layout (default)
In vertical mode, the icon appears above the title and content:Horizontal layout
In horizontal mode, the icon appears to the left of the title and content:Icon system
The card uses dynamic icon loading from Lucide React:Converts icon names to PascalCase to match Lucide’s convention. Handles kebab-case, snake_case, and camelCase inputs.
Dynamically imports icons from
lucide-react with caching to avoid re-imports. Returns null if icon not found.Utility that resolves icon names to React elements using the DynamicIcon component.
Icons are loaded asynchronously and cached for performance. A fallback icon (FileText) is used during loading or if the specified icon is not found.
Editing
In edit mode, hover over the card to reveal editing options:- Edit title: Click the title text to open the title edit modal
- Edit icon: Click the icon to open the icon edit modal
- Toggle layout: Click the layout toggle button to switch between vertical and horizontal layouts
Clickable cards
When thehref attribute is set, the card becomes clickable:
- Shadow elevation
- Scale transform (1.01)
- Border color transition to primary