# Hover reveal card

> A tall card that shows only its title until hover, when the description and a button slide up from below.

- Category: [Cards](https://library.aimran.es/components/cards)
- Built with: HTML + CSS
- Live editor: https://library.aimran.es/blocks/uv-card-reveal
- Library: AIMRAN Library (https://library.aimran.es), free, no sign-up, by Aimran Oukham

## Where to use it

A reveal card keeps a grid calm at first glance and gives details on demand. It works for the services of a design agency, projects in a portfolio or the menu sections of a restaurant. At rest you see a title at the bottom; on hover a short text and a “See more” button rise into view.

On phones the hidden part only appears after a tap, so the title has to make sense on its own. Swap the gradient for a photo to make it feel more personal, and keep the dark overlay under the text so it stays readable.

## Code

### HTML

```html
<div class="uv-kr"><div class="c"><h3>Creative studio</h3><p>Design, branding and digital products, made with love.</p><button>See more</button></div></div>
```

### CSS

```css
.uv-kr {
  --c1: #0071e3;
  --c2: #8ec5ff;
  --s: 16px;
  /* tamaño */
  --k: 1;
  /* velocidad */
  --fg: #1d1d1f;
  /* texto */
  --bg: #f5f5f7;
  /* fondo */
}

.uv-kr {
  font-family: -apple-system,BlinkMacSystemFont,"SF Pro Text","Inter",system-ui,sans-serif;
  position: relative;
  width: 15em;
  height: 18em;
  overflow: hidden;
  border-radius: 1.4em;
  font-size: var(--s);
  background: radial-gradient(circle at 30% 20%,var(--c2),transparent 50%),linear-gradient(200deg,var(--c1),color-mix(in srgb,var(--c1) 40%,#000));
  cursor: pointer;
}

.uv-kr .c {
  position: absolute;
  inset: auto 0 0;
  padding: 1.4em;
  color: #fff;
  background: linear-gradient(transparent,rgba(0,0,0,.55));
  transform: translateY(calc(100% - 3.8em));
  transition: transform calc(0.5s / var(--k)) cubic-bezier(.25,.1,.25,1);
}

.uv-kr h3 {
  margin: 0 0 .6em;
  font-size: 1.2em;
}

.uv-kr p {
  margin: 0 0 1em;
  font-size: .85em;
  line-height: 1.5;
  opacity: 0;
  transition: opacity calc(0.4s / var(--k)) cubic-bezier(.25,.1,.25,1);
}

.uv-kr button {
  font: inherit;
  font-size: .8em;
  font-weight: 600;
  padding: .6em 1.2em;
  border: 0;
  border-radius: 999px;
  background: #fff;
  color: #111;
  cursor: pointer;
}

.uv-kr:hover .c {
  transform: none;
}

.uv-kr:hover p {
  opacity: .85;
  transition-delay: calc(0.1s / var(--k));
}
```

### React

```tsx
import type { CSSProperties } from "react";

const css = `
.uv-kr {
  font-family: -apple-system,BlinkMacSystemFont,"SF Pro Text","Inter",system-ui,sans-serif;
  position: relative;
  width: 15em;
  height: 18em;
  overflow: hidden;
  border-radius: 1.4em;
  font-size: var(--s);
  background: radial-gradient(circle at 30% 20%,var(--c2),transparent 50%),linear-gradient(200deg,var(--c1),color-mix(in srgb,var(--c1) 40%,#000));
  cursor: pointer;
}

.uv-kr .c {
  position: absolute;
  inset: auto 0 0;
  padding: 1.4em;
  color: #fff;
  background: linear-gradient(transparent,rgba(0,0,0,.55));
  transform: translateY(calc(100% - 3.8em));
  transition: transform calc(0.5s / var(--k)) cubic-bezier(.25,.1,.25,1);
}

.uv-kr h3 {
  margin: 0 0 .6em;
  font-size: 1.2em;
}

.uv-kr p {
  margin: 0 0 1em;
  font-size: .85em;
  line-height: 1.5;
  opacity: 0;
  transition: opacity calc(0.4s / var(--k)) cubic-bezier(.25,.1,.25,1);
}

.uv-kr button {
  font: inherit;
  font-size: .8em;
  font-weight: 600;
  padding: .6em 1.2em;
  border: 0;
  border-radius: 999px;
  background: #fff;
  color: #111;
  cursor: pointer;
}

.uv-kr:hover .c {
  transform: none;
}

.uv-kr:hover p {
  opacity: .85;
  transition-delay: calc(0.1s / var(--k));
}
`;

export default function CardReveal() {
  return (
    <>
      <style>{css}</style>
      <div
        style={{
          "--c1": "#0071e3",
          "--c2": "#8ec5ff",
          "--s": "16px",
          "--k": "1",
          "--fg": "#1d1d1f",
          "--bg": "#f5f5f7",
        } as CSSProperties}
      >
        <div className="uv-kr"><div className="c"><h3>Creative studio</h3><p>Design, branding and digital products, made with love.</p><button>See more</button></div></div>
      </div>
    </>
  );
}
```

## Prompt for AI assistants

Paste this into ChatGPT, Claude, Cursor, v0 or Lovable to adapt the block to your stack (Tailwind, Vue, Svelte…):

````text
I want to add the “Hover reveal card” block (Cards) from AIMRAN Library to my project.

## What it is
A tall card that shows only its title until hover, when the description and a button slide up from below.

## Chosen settings
- Main color: #0071e3
- Secondary color: #8ec5ff
- Size: 16px (from 12 to 24px)
- Speed: 1x (from 0.5 to 2x)
- Text: "Creative studio"

## What I need
1. Add it to my project with the same look and animation as the reference code: same sizes, colours, radii, shadows, timings and easing.
2. It is built with plain HTML and CSS (the reference wraps it in a React component with its CSS). If my project uses something else (Vue, Svelte, Astro, plain HTML…), translate it without losing any behaviour. If I use Tailwind, turn the styles into classes; if not, keep the CSS in its own file.
3. Expose the settings above as props (or CSS variables) with those values as defaults.
4. Make it work well on phones: nothing that depends only on hover, touch targets of at least 44 px and no overflow on 320 px screens.
5. Make it look right in light and dark mode.
6. Keep it accessible: semantic HTML, roles and aria-* where needed, visible focus and keyboard support.
7. Respect prefers-reduced-motion: with reduced motion, no big animations but the same end result.

## Reference code
```tsx
import type { CSSProperties } from "react";

const css = `
.uv-kr {
  font-family: -apple-system,BlinkMacSystemFont,"SF Pro Text","Inter",system-ui,sans-serif;
  position: relative;
  width: 15em;
  height: 18em;
  overflow: hidden;
  border-radius: 1.4em;
  font-size: var(--s);
  background: radial-gradient(circle at 30% 20%,var(--c2),transparent 50%),linear-gradient(200deg,var(--c1),color-mix(in srgb,var(--c1) 40%,#000));
  cursor: pointer;
}

.uv-kr .c {
  position: absolute;
  inset: auto 0 0;
  padding: 1.4em;
  color: #fff;
  background: linear-gradient(transparent,rgba(0,0,0,.55));
  transform: translateY(calc(100% - 3.8em));
  transition: transform calc(0.5s / var(--k)) cubic-bezier(.25,.1,.25,1);
}

.uv-kr h3 {
  margin: 0 0 .6em;
  font-size: 1.2em;
}

.uv-kr p {
  margin: 0 0 1em;
  font-size: .85em;
  line-height: 1.5;
  opacity: 0;
  transition: opacity calc(0.4s / var(--k)) cubic-bezier(.25,.1,.25,1);
}

.uv-kr button {
  font: inherit;
  font-size: .8em;
  font-weight: 600;
  padding: .6em 1.2em;
  border: 0;
  border-radius: 999px;
  background: #fff;
  color: #111;
  cursor: pointer;
}

.uv-kr:hover .c {
  transform: none;
}

.uv-kr:hover p {
  opacity: .85;
  transition-delay: calc(0.1s / var(--k));
}
`;

export default function CardReveal() {
  return (
    <>
      <style>{css}</style>
      <div
        style={{
          "--c1": "#0071e3",
          "--c2": "#8ec5ff",
          "--s": "16px",
          "--k": "1",
          "--fg": "#1d1d1f",
          "--bg": "#f5f5f7",
        } as CSSProperties}
      >
        <div className="uv-kr"><div className="c"><h3>Creative studio</h3><p>Design, branding and digital products, made with love.</p><button>See more</button></div></div>
      </div>
    </>
  );
}
```

Give me the complete final code, ready to paste, and tell me in one line where to put it in my project.
````
