# Profile card with actions

> A person card whose avatar grows on hover while “Follow” and “Message” buttons slide into view.

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

## Where to use it

This profile card suits any page that introduces people: the team section of a studio, the author box under a blog post, a directory of freelancers or the speaker list of a conference. It shows initials, a name and a role. On hover the avatar grows a little and two buttons appear, one bold and one quiet.

The buttons stay hidden until hover, so phone users may never see them. If contacting the person matters, show the buttons all the time. Replace the initials with a real photo when you have one, it makes the card far warmer.

## Code

### HTML

```html
<div class="uv-kp"><div class="av">LM</div><h3>Lucía Martín</h3><p>Product designer</p><div class="bt"><button>Follow</button><button>Message</button></div></div>
```

### CSS

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

.uv-kp {
  font-family: -apple-system,BlinkMacSystemFont,"SF Pro Text","Inter",system-ui,sans-serif;
  width: 14em;
  padding: 1.8em 1.4em 1.4em;
  border-radius: 1.4em;
  font-size: var(--s);
  text-align: center;
  background: var(--bg);
  box-shadow: 0 2px 10px rgba(0,0,0,.06),0 0 0 1px color-mix(in srgb,var(--fg) 8%,transparent);
  transition: box-shadow calc(0.4s / var(--k)) cubic-bezier(.25,.1,.25,1);
}

.uv-kp .av {
  display: grid;
  place-items: center;
  width: 4em;
  height: 4em;
  margin: 0 auto 1em;
  border-radius: 50%;
  font-weight: 700;
  color: #fff;
  background: linear-gradient(135deg,var(--c2),var(--c1));
  box-shadow: 0 0 0 .25em var(--bg),0 0 0 .35em color-mix(in srgb,var(--c1) 30%,transparent);
  transition: transform calc(0.5s / var(--k)) cubic-bezier(.34,1.56,.64,1);
}

.uv-kp h3 {
  margin: 0;
  font-size: 1.05em;
  color: var(--fg);
}

.uv-kp p {
  margin: .3em 0 0;
  font-size: .8em;
  color: color-mix(in srgb,var(--fg) 55%,transparent);
}

.uv-kp .bt {
  display: flex;
  gap: .5em;
  justify-content: center;
  max-height: 0;
  opacity: 0;
  overflow: hidden;
  transition: all calc(0.45s / var(--k)) cubic-bezier(.25,.1,.25,1);
}

.uv-kp button {
  font: inherit;
  font-size: .8em;
  font-weight: 600;
  padding: .6em 1.1em;
  border: 0;
  border-radius: 999px;
  cursor: pointer;
  color: #fff;
  background: var(--c1);
}

.uv-kp button+button {
  color: var(--fg);
  background: color-mix(in srgb,var(--fg) 8%,transparent);
}

.uv-kp:hover {
  box-shadow: 0 24px 48px -20px color-mix(in srgb,var(--c1) 45%,transparent),0 0 0 1px color-mix(in srgb,var(--fg) 8%,transparent);
}

.uv-kp:hover .av {
  transform: scale(1.15) translateY(-.2em);
}

.uv-kp:hover .bt {
  max-height: 4em;
  opacity: 1;
  padding-top: 1.1em;
}
```

### React

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

const css = `
.uv-kp {
  font-family: -apple-system,BlinkMacSystemFont,"SF Pro Text","Inter",system-ui,sans-serif;
  width: 14em;
  padding: 1.8em 1.4em 1.4em;
  border-radius: 1.4em;
  font-size: var(--s);
  text-align: center;
  background: var(--bg);
  box-shadow: 0 2px 10px rgba(0,0,0,.06),0 0 0 1px color-mix(in srgb,var(--fg) 8%,transparent);
  transition: box-shadow calc(0.4s / var(--k)) cubic-bezier(.25,.1,.25,1);
}

.uv-kp .av {
  display: grid;
  place-items: center;
  width: 4em;
  height: 4em;
  margin: 0 auto 1em;
  border-radius: 50%;
  font-weight: 700;
  color: #fff;
  background: linear-gradient(135deg,var(--c2),var(--c1));
  box-shadow: 0 0 0 .25em var(--bg),0 0 0 .35em color-mix(in srgb,var(--c1) 30%,transparent);
  transition: transform calc(0.5s / var(--k)) cubic-bezier(.34,1.56,.64,1);
}

.uv-kp h3 {
  margin: 0;
  font-size: 1.05em;
  color: var(--fg);
}

.uv-kp p {
  margin: .3em 0 0;
  font-size: .8em;
  color: color-mix(in srgb,var(--fg) 55%,transparent);
}

.uv-kp .bt {
  display: flex;
  gap: .5em;
  justify-content: center;
  max-height: 0;
  opacity: 0;
  overflow: hidden;
  transition: all calc(0.45s / var(--k)) cubic-bezier(.25,.1,.25,1);
}

.uv-kp button {
  font: inherit;
  font-size: .8em;
  font-weight: 600;
  padding: .6em 1.1em;
  border: 0;
  border-radius: 999px;
  cursor: pointer;
  color: #fff;
  background: var(--c1);
}

.uv-kp button+button {
  color: var(--fg);
  background: color-mix(in srgb,var(--fg) 8%,transparent);
}

.uv-kp:hover {
  box-shadow: 0 24px 48px -20px color-mix(in srgb,var(--c1) 45%,transparent),0 0 0 1px color-mix(in srgb,var(--fg) 8%,transparent);
}

.uv-kp:hover .av {
  transform: scale(1.15) translateY(-.2em);
}

.uv-kp:hover .bt {
  max-height: 4em;
  opacity: 1;
  padding-top: 1.1em;
}
`;

export default function CardProfile() {
  return (
    <>
      <style>{css}</style>
      <div
        style={{
          "--c1": "#0071e3",
          "--c2": "#8ec5ff",
          "--s": "16px",
          "--k": "1",
          "--fg": "#1d1d1f",
          "--bg": "#f5f5f7",
        } as CSSProperties}
      >
        <div className="uv-kp"><div className="av">LM</div><h3>Lucía Martín</h3><p>Product designer</p><div className="bt"><button>Follow</button><button>Message</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 “Profile card with actions” block (Cards) from AIMRAN Library to my project.

## What it is
A person card whose avatar grows on hover while “Follow” and “Message” buttons slide into view.

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

## 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-kp {
  font-family: -apple-system,BlinkMacSystemFont,"SF Pro Text","Inter",system-ui,sans-serif;
  width: 14em;
  padding: 1.8em 1.4em 1.4em;
  border-radius: 1.4em;
  font-size: var(--s);
  text-align: center;
  background: var(--bg);
  box-shadow: 0 2px 10px rgba(0,0,0,.06),0 0 0 1px color-mix(in srgb,var(--fg) 8%,transparent);
  transition: box-shadow calc(0.4s / var(--k)) cubic-bezier(.25,.1,.25,1);
}

.uv-kp .av {
  display: grid;
  place-items: center;
  width: 4em;
  height: 4em;
  margin: 0 auto 1em;
  border-radius: 50%;
  font-weight: 700;
  color: #fff;
  background: linear-gradient(135deg,var(--c2),var(--c1));
  box-shadow: 0 0 0 .25em var(--bg),0 0 0 .35em color-mix(in srgb,var(--c1) 30%,transparent);
  transition: transform calc(0.5s / var(--k)) cubic-bezier(.34,1.56,.64,1);
}

.uv-kp h3 {
  margin: 0;
  font-size: 1.05em;
  color: var(--fg);
}

.uv-kp p {
  margin: .3em 0 0;
  font-size: .8em;
  color: color-mix(in srgb,var(--fg) 55%,transparent);
}

.uv-kp .bt {
  display: flex;
  gap: .5em;
  justify-content: center;
  max-height: 0;
  opacity: 0;
  overflow: hidden;
  transition: all calc(0.45s / var(--k)) cubic-bezier(.25,.1,.25,1);
}

.uv-kp button {
  font: inherit;
  font-size: .8em;
  font-weight: 600;
  padding: .6em 1.1em;
  border: 0;
  border-radius: 999px;
  cursor: pointer;
  color: #fff;
  background: var(--c1);
}

.uv-kp button+button {
  color: var(--fg);
  background: color-mix(in srgb,var(--fg) 8%,transparent);
}

.uv-kp:hover {
  box-shadow: 0 24px 48px -20px color-mix(in srgb,var(--c1) 45%,transparent),0 0 0 1px color-mix(in srgb,var(--fg) 8%,transparent);
}

.uv-kp:hover .av {
  transform: scale(1.15) translateY(-.2em);
}

.uv-kp:hover .bt {
  max-height: 4em;
  opacity: 1;
  padding-top: 1.1em;
}
`;

export default function CardProfile() {
  return (
    <>
      <style>{css}</style>
      <div
        style={{
          "--c1": "#0071e3",
          "--c2": "#8ec5ff",
          "--s": "16px",
          "--k": "1",
          "--fg": "#1d1d1f",
          "--bg": "#f5f5f7",
        } as CSSProperties}
      >
        <div className="uv-kp"><div className="av">LM</div><h3>Lucía Martín</h3><p>Product designer</p><div className="bt"><button>Follow</button><button>Message</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.
````
