Skip to content

New301 animated icons, 75 free. See the icons ›

Nexus UI

Frozen Card, animated React component

The card screen of a banking app, where you can freeze your card. The “Aurora” debit card tilts toward your pointer with a glare and a holographic sheen, glowing in its own colours on a dark panel. Press Freeze card and feathery frost grows in from the corners and edges with a frosted bloom behind it, the print blurs and drains to icy slate blue, the card shivers, a Frozen tag replaces the network mark, and snow falls across the whole screen, some of it in front of the card; tilt it and the glare sparkles on the ice. Unfreeze and cracks race across the ice, it melts from the middle outwards with drips running off the bottom edge, and a warm glow brings the colour back. The eye on the card shows the full number. Keyboard: Tab to Freeze card (a switch) and press Space or Enter; the eye, Change limits, Transactions, back and more are buttons.

  • Pro
  • Cards
  • Hover
  • 3D

Play with it

Move the controls and watch it change. Copy code gives you a snippet with only the props you changed.

Debit card

Active

Debit card ending in 7481, Maya Chen
Spent this month$1,284.20 of $2,000

Props

PropTypeDefaultWhat it does
frozen—controlled frozen state
defaultFrozenfalseStarting value of frozen when you leave it uncontrolled.
onFrozenChange—Called when the visitor uses frozen change.
holder"Maya Chen"The holder shown in the component.
last4"7481"The last4 shown in the component.
number—the full number shown when the eye is pressed (a sample ending in last4 by default)
expiry"08/29"The expiry shown in the component.
title"Debit card"The title shown in the component.
spent1284.2spent so far this month and the monthly limit, for the meter under the card
limit2000The limit shown in the component.
currency"$"The currency shown in the component.
onLimits—Called when the visitor uses limits.
onDetails—the "more" button in the header
onTransactions—Called when the visitor uses transactions.
onBack—Called when the visitor uses back.
autoplayfalsePlays a demo by itself until the first touch. Held still under reduced motion.
className""Extra classes for the outer element.

Add it to your project

  1. 1

    Set up your project once

    You need a Next.js project with Tailwind CSS and the @/ import alias. In its root folder, run this once. It creates components.json and the cn() helper in src/lib/utils.ts:

    npx shadcn@latest init -d

    Starting from nothing? The Quick Start walks through the whole thing.

  2. 2

    Connect the registry with your API key

    Frozen Card is a Pro item, so the CLI has to send your API key. Do this once per project:

    1. Create a key at nexus-ui.com/dashboard/api-key. Copy it straight away: it starts with nxs_ and is shown only once.
    2. In your project root, next to package.json, create a file named .env.local with this line, using your own key:
      NEXUS_API_KEY=nxs_your_key_here
    3. Open components.json and add this entry inside the outermost braces, next to "aliases". Leave {name} and ${NEXUS_API_KEY} exactly as written; the CLI fills them in:
      "registries": {
        "@nexus-labs": {
          "url": "https://www.nexus-ui.com/api/registry/{name}",
          "headers": {
            "Authorization": "Bearer ${NEXUS_API_KEY}"
          }
        }
      }