Base JS behaviour

Card

The base content surface with body/footer slots; interactive, spotlight and tilt modes for destination cards.

Real scenarios

The component as it is used in a product — not a specimen grid.

The app-store shelf

Each card is one destination: hover lifts it, the spotlight follows the pointer and the featured card leans toward your cursor. Ratings and install counts run through the locale formatter so the digits stay Persian.

With href the whole card becomes one <a>, so Tab and Enter work like any link; the tilt follows mouse and pen only — touch is ignored on purpose.

The order awaiting payment

No href here — the card is a container: line items and the total in the body, the actions in the footer. «Send a reminder» sleeps 900ms on the server so the button’s spinner (wire:loading) gets to show itself.

Order #1,024 — awaiting payment

Placed 20 minutes ago; the stock hold lifts at midnight.

  • White leather sneakers ×1 1,250,000
  • Thick wool socks ×2 390,000
  • Express shipping ×1 205,000

Order total 1,845,000 Toman

Shipping insurance

Damage and loss stay covered until the parcel is delivered — an outline card keeps the add-on quiet beside the order.

Upgrading the plan

Variants carry meaning: Pro — our pick — sits in the gradient frame with the spotlight, Enterprise on the inverse surface; choosing a plan moves the “current plan” badge through $set, and the glass trial card floats on the aurora in both themes.

Seven days of Pro, on us

Every feature unlocked, no bank card needed.

Base

For a store finding its feet.

290,000 Toman / month

  • 5 teammates
  • 1,000 orders a month
  • Email support

Pro

Our recommendation for a growing store.

490,000 Toman / month

  • Unlimited teammates
  • NabuGate payment gateway
  • Profit per product

Enterprise

Multi-branch inventory on a contract.

By agreement

  • Branch inventory sync
  • Formal contracts and invoices
  • A dedicated agent

The recommended card gets interactive + spotlight: it lifts on hover and its icon rolls, while the plain cards stay still — the same surface, saying different things.

Important props

Important props
Prop Type Default What it does
interactive / spotlight / tilt bool false Hover lift, a light following the pointer, and a lean toward the pointer (the lean ignores touch).
variant string default The surface’s visual frame: default · glass · outline · gradient · inverse — say gradient for the recommended plan, inverse for the enterprise pitch.
size string md Size: sm · md · lg — sm for the small card beside the main content.
href string null With href the whole card becomes an <a>; Tab and Enter behave like any link.
title / description / icon string null The ready-made card head; body in the default slot, footer in the footer slot.

Snippet

<x-nx::card interactive spotlight icon="zap" title="نابوگیت"
    description="دروازهٔ پرداخت" href="/gate">
    <x-slot:footer>راه‌اندازی در ۵ دقیقه</x-slot:footer>
</x-nx::card>