Display

Card

A quiet container for related content. Two variants, nothing more.

Usage

Resets on the 1st of each month.

8,214of 10,000 builds
Copy
<template>
  <JCard title="Usage" description="Resets on the 1st of each month.">
    <div class="flex items-baseline justify-between">
      <span class="text-2xl font-semibold tracking-tight text-fg tabular-nums">8,214</span>
      <span class="text-sm text-fg-muted">of 10,000 builds</span>
    </div>
    <div class="mt-3 h-1 overflow-hidden rounded-full bg-surface-active">
      <div class="h-full w-[82%] rounded-full bg-fg" />
    </div>
  </JCard>
</template>

Installation #

With the Nuxt module, every component is auto-imported — there is nothing to add. In a plain Vue project, import what you use:

Copy
import { JCard } from '@juxtui/ui'

Usage #

Copy
<JCard title="Usage" description="Resets on the 1st of each month.">
  …
</JCard>

Variants & examples #

Custom domain

Point your domain at juxt.ui to go live.

Pending

Add a CNAME record for app.acme.com pointing to cname.juxt.dev. Changes can take up to an hour.

Copy
<template>
  <JCard title="Custom domain" description="Point your domain at juxt.ui to go live.">
    <template #actions>
      <JBadge variant="warning" dot>Pending</JBadge>
    </template>
    <p>Add a CNAME record for <code class="font-mono text-xs text-fg">app.acme.com</code> pointing to <code class="font-mono text-xs text-fg">cname.juxt.dev</code>. Changes can take up to an hour.</p>
    <template #footer>
      <JButton variant="ghost" size="sm">Remove</JButton>
      <JButton size="sm">Verify</JButton>
    </template>
  </JCard>
</template>

Muted#

Recedes into the page — useful for secondary panels and empty states.

No deployments yet

Push to your main branch to trigger the first one.

Copy
<script setup lang="ts">
import { Inbox } from '@lucide/vue'
</script>

<template>
  <JCard variant="muted" padding="lg">
    <div class="flex flex-col items-center py-4 text-center">
      <Inbox class="size-5 text-fg-muted" :stroke-width="1.5" />
      <p class="mt-3 text-sm font-medium text-fg">No deployments yet</p>
      <p class="mt-1 text-sm">Push to your main branch to trigger the first one.</p>
    </div>
  </JCard>
</template>

API #

Props

PropTypeDefault Description
titlestring—Heading.
descriptionstring—Supporting line under the title.
variant'outline' | 'muted''outline'Outline sits on the page; muted recedes into it.
padding'none' | 'sm' | 'md' | 'lg''md'Inner spacing: 0, 12, 20 or 24px.
asstring | Component'div'Root element, e.g. section or article.

Slots

SlotProps Description
default—Body.
actions—Right of the title — a button, badge or menu.
footer—Separated by a hairline; right-aligned.
header—Replace the title block.

Accessibility #

  • The title renders as an <h3>. Use as="section" with a heading to create a landmark when the card is a distinct region.