Mockups

daisyUI's mockups dress plain HTML up as screenshots. DMockupCode, DMockupBrowser, DMockupWindow and DMockupPhone wrap them — content stays real, markup stays honest.

Code
dotnet add package DaisyBlazorUI
Restore completed in 412ms
warn: NU1701 — package restored with .NETFramework
error CS0246: The type or namespace 'DQuantum' could not be found
<DMockupCode Class="w-full max-w-xl">
    <pre data-prefix="$"><span>dotnet add package DaisyBlazorUI</span></pre>
    <pre data-prefix=">" class="text-success"><span>Restore completed in 412ms</span></pre>
    <pre data-prefix="!" class="text-warning"><span>warn: NU1701 — package restored with .NETFramework</span></pre>
    <pre data-prefix="x" class="text-error"><span>error CS0246: The type or namespace 'DQuantum' could not be found</span></pre>
</DMockupCode>
Browser

Your app, framed

Any content works inside — here a DList:

⭐ Starred
carousel.css
📁 Unstarred
chat.css
<DMockupBrowser Address="daisyui.com/components/carousel" Class="w-full max-w-2xl">
    <div class="p-8 min-h-40">
        <h3 class="font-bold text-lg">Your app, framed</h3>
        <p class="opacity-70 mt-1">Any content works inside — here a <code>DList</code>:</p>
        <DList Class="mt-3 max-w-sm">
            <DListItem><div>⭐ Starred</div><div class="list-col-grow opacity-60">carousel.css</div></DListItem>
            <DListItem><div>📁 Unstarred</div><div class="list-col-grow opacity-60">chat.css</div></DListItem>
        </DList>
    </div>
</DMockupBrowser>
Window
99.9%
uptime
14ms
p50 latency
<DMockupWindow Class="w-full max-w-md bg-base-200">
    <div class="p-6 grid grid-cols-2 gap-3">
        <div class="stat place-items-center p-3">
            <div class="stat-value text-2xl">99.9%</div>
            <div class="stat-desc">uptime</div>
        </div>
        <div class="stat place-items-center p-3">
            <div class="stat-value text-2xl">14ms</div>
            <div class="stat-desc">p50 latency</div>
        </div>
    </div>
</DMockupWindow>
Phone
Run the smoke test 🧪
PASS ✅
full-screen app
<DMockupPhone Class="max-w-64">
    <Display>
        <div class="bg-base-100 h-full w-full overflow-hidden p-3 space-y-2">
            <DChat Side="DaisyChatSide.Start" Color="DaisyColor.Primary">Run the smoke test 🧪</DChat>
            <DChat Side="DaisyChatSide.End" Color="DaisyColor.Success">PASS ✅</DChat>
        </div>
    </Display>
</DMockupPhone>
 
<DMockupPhone Camera="false" Class="max-w-64">
    <Display>
        <div class="bg-primary text-primary-content h-full w-full grid place-items-center font-bold">
            full-screen app
        </div>
    </Display>
</DMockupPhone>

API

DMockupCode

Parameters

Name Type Default Binding Description
ChildContent RenderFragment — — Code lines — write plain <pre data-prefix="$"> elements (daisy renders the prefix and supports pre.warning / pre.error / pre.success highlights).
Class string — — Additional CSS classes appended to the component's computed daisyUI classes.
Style string — — Inline styles applied to the root element.
DMockupBrowser

Parameters

Name Type Default Binding Description
ShowToolbar bool True — Whether to render the browser chrome bar ( mockup-browser-toolbar ).
Address string — — Value shown in the toolbar address field.
AddressPlaceholder string — — Placeholder for the address field.
ChildContent RenderFragment — — Page content shown inside the fake browser.
Class string — — Additional CSS classes appended to the component's computed daisyUI classes.
Style string — — Inline styles applied to the root element.
DMockupWindow

Parameters

Name Type Default Binding Description
ChildContent RenderFragment — — Window content (daisy draws the three traffic-light dots automatically).
Class string — — Additional CSS classes appended to the component's computed daisyUI classes.
Style string — — Inline styles applied to the root element.
DMockupPhone

Parameters

Name Type Default Binding Description
Camera bool True — Whether to render the notch ( mockup-phone-camera ).
Display RenderFragment — — Content shown on the phone screen.
Class string — — Additional CSS classes appended to the component's computed daisyUI classes.
Style string — — Inline styles applied to the root element.
DList

Parameters

Name Type Default Binding Description
ChildContent RenderFragment — — The DListItem rows.
Class string — — Additional CSS classes appended to the component's computed daisyUI classes.
Style string — — Inline styles applied to the root element.
DListItem

Parameters

Name Type Default Binding Description
ChildContent RenderFragment — — Row columns.
Class string — — Additional CSS classes appended to the component's computed daisyUI classes.
Style string — — Inline styles applied to the root element.
DChat

Parameters

Name Type Default Binding Description
Side DaisyChatSide Start — Which side of the conversation this message is on.
StartEnd
Color DaisyColor Default — Color of the bubble (emits chat-bubble-* ; Default leaves it neutral).
DefaultPrimarySecondaryAccentInfoSuccessWarningErrorGhostNeutral
Header string — — Small text above the bubble (e.g. the sender's name).
HeaderContent RenderFragment — — Markup above the bubble; rendered after Header .
Footer string — — Small text below the bubble (e.g. "seen").
FooterContent RenderFragment — — Markup below the bubble; rendered after Footer .
ImageSrc string — — Avatar image URL shown next to the bubble.
ImageAlt string — — Alt text for ImageSrc .
ImageClass string — — Classes for the avatar image; defaults to w-10 rounded-full .
ChildContent RenderFragment — — The bubble content.
Class string — — Additional CSS classes appended to the component's computed daisyUI classes.
Style string — — Inline styles applied to the root element.
Connection lost — reconnecting…
Connection failed.
The server has stopped.