ArticleCard
This topic describes the anatomy, API reference, and variations of the ArticleCard primitive component.
Anatomy
import { ArticleCard } from '@sitecore-search/ui';
const MyArticleCardComponent = () => (
<ArticleCard.Root>
<ArticleCard.Id />
<ArticleCard.Title />
<ArticleCard.Subtitle />
<ArticleCard.Image />
<ArticleCard.Content />
</ArticleCard.Root>
);Using the component
The following tabs describe use of the ArticleCard primitive component.
Anatomy
import { ArticleCard } from '@sitecore-search/ui';
const MyArticleCardComponent = () => (
<ArticleCard.Root>
<ArticleCard.Id />
<ArticleCard.Title />
<ArticleCard.Subtitle />
<ArticleCard.Image />
<ArticleCard.Content />
</ArticleCard.Root>
);Setting component properties
The following sections describe the various ways you can set values in the component.
Setting the title
Setting the subtitle
Setting images
API reference
ArticleCard.Root
The ArticleCard.Root component contains all the components of the article card.
Children: ArticleCard.Title, ArticleCard.Subtitle, ArticleCard.Id, ArticleCard.Image, and ArticleCard.Content
|
Name |
Description |
|---|---|
|
|
The article object |
ArticleCard.Title
The ArticleCard.Title component is the wrapper for the article's title. If children is not provided, the component uses the value of title from the article present on the Root component.
Parent: ArticleCard.Root
|
Name |
Description |
|---|---|
|
|
The type of the title used (can be |
ArticleCard.Subtitle
The Article.Subtitle component is the wrapper for the article's subtitle. If children is not provided, the component uses the value of subtitle from the article present on the Root component.
Parent: ArticleCard.Root
ArticleCard.Id
The ArticleCard.Id component is the wrapper for article's ID. If no children is provided, the component uses the value of the ID from the article property present on the Root component.
Parent: ArticleCard.Root
ArticleCard.Image
The AccordionFacets.Root component contains all the parts of an accordion.
Parent: ArticleCard.Root
ArticleCard.Content
The ArticleCard.Content component is the wrapper for content.
Parent: ArticleCard.Root

