Profile Card
TarjetasMaterial UIv1.0.0cardprofileusersocialmui
Tarjeta de perfil IA-First: avatar, nombre, rol y biografía con acciones viewProfile / followUser (esta última con confirmación).
npx webmcpcss components import mui-profile-card/* Componente: Profile Card */
/* Categoría: cards · Librería: mui · Versión: 1.0.0 */
/* Tarjeta de perfil IA-First: avatar, nombre, rol y biografía con acciones viewProfile / followUser (esta última con confirmación). */
/* Importar: npx webmcpcss components import mui-profile-card */
/* Material UI: el HTML es el DOM que renderiza <Card …>; pasa data-* como props. */
/* Contrato WebMCP */
.MuiCard-root[data-component="profile-card"] [data-tool="viewProfile"] {
webmcp-tool: "viewProfile";
webmcp-description: "Abre el perfil completo de la persona";
webmcp-param-userId: attr(data-user-id);
webmcp-intent: "navigate";
webmcp-confirmation: "none";
webmcp-permissions: "read-only";
}
.MuiCard-root[data-component="profile-card"] [data-tool="followUser"] {
webmcp-tool: "followUser";
webmcp-description: "Sigue a la persona (acción social, requiere confirmación)";
webmcp-param-userId: attr(data-user-id);
webmcp-intent: "action";
webmcp-confirmation: "needed";
webmcp-permissions: "restricted";
}
.MuiCard-root[data-component="profile-card"] [data-context="profile-name"] { webmcp-context: "profileName"; webmcp-format: "text"; }
.MuiCard-root[data-component="profile-card"] [data-context="profile-role"] { webmcp-context: "profileRole"; webmcp-format: "text"; }
<div class="MuiPaper-root MuiCard-root" data-component="profile-card" data-user-id="u-1024">
<div class="MuiCardContent-root" style="display:flex;gap:16px;align-items:center">
<div class="MuiAvatar-root" aria-hidden="true">AR</div>
<div>
<h6 class="MuiTypography-root MuiTypography-h6" data-context="profile-name">Ana Ruiz</h6>
<p class="MuiTypography-root MuiTypography-body2" data-context="profile-role">Diseñadora de producto · Bogotá</p>
</div>
</div>
<div class="MuiCardContent-root" style="padding-top:0"><p class="MuiTypography-root MuiTypography-body1">Diseño sistemas de componentes accesibles y nativos para agentes.</p></div>
<div class="MuiCardActions-root">
<button class="MuiButtonBase-root MuiButton-root MuiButton-contained MuiButton-containedPrimary" type="button" data-tool="followUser">Seguir</button>
<a class="MuiButtonBase-root MuiButton-root MuiButton-outlined MuiButton-outlinedPrimary" href="#perfil/u-1024" data-tool="viewProfile">Ver perfil</a>
</div>
</div>
<Card data-component="profile-card" data-user-id={user.id}>
<CardHeader avatar={<Avatar>{user.initials}</Avatar>} title={<span data-context="profile-name">{user.name}</span>} subheader={<span data-context="profile-role">{user.role}</span>} />
<CardContent><Typography>{user.bio}</Typography></CardContent>
<CardActions>
<Button variant="contained" data-tool="followUser">Seguir</Button>
<Button variant="outlined" href={user.url} data-tool="viewProfile">Ver perfil</Button>
</CardActions>
</Card>{
"id": "mui-profile-card",
"name": "Profile Card",
"category": "cards",
"library": "mui",
"version": "1.0.0",
"description": "Tarjeta de perfil IA-First: avatar, nombre, rol y biografía con acciones viewProfile / followUser (esta última con confirmación).",
"author": "WebMCPcss Team",
"tags": [
"card",
"profile",
"user",
"social",
"mui"
],
"controls": [
{
"variable": "--wm-primary",
"label": "Color primario",
"type": "color",
"default": "#1976d2"
},
{
"variable": "--wm-on-primary",
"label": "Texto sobre primario",
"type": "color",
"default": "#ffffff"
},
{
"variable": "--wm-radius",
"label": "Radio",
"type": "range",
"default": "4px",
"min": 0,
"max": 24,
"step": 1,
"unit": "px"
}
],
"promptExamples": [
"cambia el nombre de la tarjeta de perfil a Ana Ruiz",
"oculta el botón Seguir"
],
"animateExamples": [
"aplica fade-in a la tarjeta de perfil",
"haz que el avatar pulse suavemente"
],
"related": [
"core-profile-card",
"tailwind-profile-card",
"bootstrap-profile-card",
"shadcn-profile-card"
],
"usage": {
"framework": "react",
"code": "<Card data-component=\"profile-card\" data-user-id={user.id}>\n <CardHeader avatar={<Avatar>{user.initials}</Avatar>} title={<span data-context=\"profile-name\">{user.name}</span>} subheader={<span data-context=\"profile-role\">{user.role}</span>} />\n <CardContent><Typography>{user.bio}</Typography></CardContent>\n <CardActions>\n <Button variant=\"contained\" data-tool=\"followUser\">Seguir</Button>\n <Button variant=\"outlined\" href={user.url} data-tool=\"viewProfile\">Ver perfil</Button>\n </CardActions>\n</Card>"
},
"preview": "preview.css",
"css": "profile-card.webmcp.css",
"html": "profile-card.html"
}Cómo usarlo
- Importa el componente a tu proyecto (HTML +
.webmcp.css+component.json):npx webmcpcss components import mui-profile-card --output ./src/components - O añade solo el contrato a tu
webmcp.cssexistente (bloque delimitado y actualizable):npx webmcpcss components import mui-profile-card --merge ./webmcp.css - Publícalo para los agentes: MCP (
webmcpcss mcp --serve --css ./webmcp.css),document.modelContext(webmcpcss standard compile ./webmcp.css --html index.html) o exporta a tu agente favorito (webmcpcss export --agent claude-code).
Herramientas para agentes
| Herramienta | Descripción | Parámetros | Intención | Confirmación | Selector |
|---|---|---|---|---|---|
viewProfile | Abre el perfil completo de la persona | userId | navigate | none | .MuiCard-root[data-component="profile-card"] [data-tool="viewProfile"] |
followUser | Sigue a la persona (acción social, requiere confirmación) | userId | action | needed | .MuiCard-root[data-component="profile-card"] [data-tool="followUser"] |
Contexto que publica
| Dato | Formato | Selector |
|---|---|---|
profileName | text | .MuiCard-root[data-component="profile-card"] [data-context="profile-name"] |
profileRole | text | .MuiCard-root[data-component="profile-card"] [data-context="profile-role"] |
Ejemplos con la CLI
webmcpcss prompt — lenguaje natural sobre el componente
cambia el nombre de la tarjeta de perfil a Ana Ruizoculta el botón Seguir
webmcpcss animate — animaciones declarativas
aplica fade-in a la tarjeta de perfilhaz que el avatar pulse suavemente