# Display Components

Avatars, amounts, cards, vouchers, timelines and carousels. Exact props: `widgets-get-component-props`.

---

## DAvatar

```tsx
<DAvatar name={user.name} useNameAsInitials size="lg" />
<DAvatar image={user.photoUrl} name={user.name} />
```

`size` is `xs`, `sm`, `lg`, `xl` or `xxl`. `useNameAsInitials` shows the initials of `name` instead of an image.

## DCurrencyText

Shows an amount formatted with the currency set on `DContextProvider`:

```tsx
<DCurrencyText value={balance} />
```

`value` is a number. To edit an amount use `DInputCurrency` (`modyo://docs/widgets/components-inputs`); to format amounts in code, `useFormatCurrency` (`modyo://docs/widgets/components-hooks`).

## DCreditCard

A card visual: `brand`, `name`, `number`, `holderText`, `logoImage`, `isChipVisible`, `isVertical`.

## DVoucher

A receipt for a completed operation, with download and share actions. `title` and `message` are required; `amount` and `amountDetails` show the amount; `downloadText`, `shareText` and `fileName` set the actions; `hideActions` removes them; the children render inside the voucher.

## DTimeline

A list of events. Each item has a required `title`, and optionally `description`, `time`, `icon` and `status` (`success`, `warning`, `danger`, `info`):

```tsx
<DTimeline
  items={[
    { title: t('claim.received'), time: '10:30', status: 'success' },
    { title: t('claim.inReview'), status: 'info' },
  ]}
/>
```

## DCarousel and DCarousel.Slide

A slider built on Splide. `options` are Splide options (forwarded); each slide is a `DCarousel.Slide`; `iconArrowLeft` and `iconArrowRight` change the arrows:

```tsx
<DCarousel options={{ perPage: 1, gap: '1rem' }}>
  {offers.map((offer) => (
    <DCarousel.Slide key={offer.id}>
      <OfferCard offer={offer} />
    </DCarousel.Slide>
  ))}
</DCarousel>
```
