0.7.4 gives the Ambient pack weather. A page names one feed URL on its own site, and the pack sets data-weather from it, uses its sunrise and sunset for dawn and dusk, and never shows a stale observation. Helpers for producing the feed from Open-Meteo are included. Ambient p…
User profile patterns with avatar displays, stats, activity feeds, and action buttons. Build profile pages and user cards for your applications.
Overview
Profile patterns display user information in various contexts, from compact cards to full-page layouts. These patterns combine avatars, user data, statistics, and interactive elements into cohesive displays.
Key features:
Avatar display with image or initials fallback
<hgroup> for name + role pairs with automatic muted subtitle styling
<dl> / <dt> / <dd> for stat label/value pairs — semantic and accessible
Activity feeds showing recent actions
Action buttons for messaging, following, and editing
Responsive sidebar layout that automatically stacks on smaller screens
Profile Header
A profile header built on data-layout="media": a large avatar in the figure column, with the name, role, bio, stats row and edit button stacked beside it. Ideal for the top of a user's profile page.
profile-header.html
<layout-carddata-padding="xl"><headerdata-layout="media"data-layout-gap="xl"><!-- Avatar: slot="figure" puts it in the media column --><user-avatardata-size="2xl"slot="figure"><spandata-fallback>JD</span></user-avatar><!-- Name and Role --><hgroup><h1>Jane Doe</h1><p>Senior Product Designer</p></hgroup><!-- Bio --><p>Passionate about creating intuitive user experiences...</p><!-- Stats --><dldata-layout="cluster"data-layout-gap="xl"data-variant="stacked"><div><dt>Posts</dt><dd><strong>142</strong></dd></div><div><dt>Followers</dt><dd><strong>12.4K</strong></dd></div><div><dt>Following</dt><dd><strong>891</strong></dd></div></dl><!-- Edit Button --><p><buttontype="button"class="button secondary"><icon-wcname="edit"size="sm"></icon-wc> Edit Profile</button></p></header></layout-card>
Stat Row Styles
The hgroup mutes the role, data-variant="stacked" mutes the stat labels and drops the <dd> indent, and <strong> weights the numbers. No extra CSS is needed: a stacked list that is also data-layout spaces its groups with the layout's gap instead of a block margin.
Profile Card
A compact profile card suitable for user lists, team member displays, or search results. Features an avatar, name, email, description, and action buttons.
profile-card.html
<layout-carddata-padding="l"><layout-stackdata-layout-gap="m"><headerdata-layout="media"data-layout-gap="m"data-layout-align="center"><user-avatardata-size="lg"slot="figure"><imgsrc="user-photo.jpg"alt="Alex Thompson" /></user-avatar><hgroup><h2>Alex Thompson</h2><p><ahref="mailto:[email protected]">[email protected]</a></p></hgroup></header><p>Full-stack developer with 8 years of experience.</p><layout-clusterdata-layout-gap="s"><buttontype="button"class="button small"><icon-wcname="mail"size="sm"></icon-wc> Message</button><buttontype="button"class="button small secondary"><icon-wcname="user-plus"size="sm"></icon-wc> Follow</button></layout-cluster></layout-stack></layout-card>
No custom CSS: <hgroup> mutes the email line, and slot="figure" sends the avatar to the media column.
Full Profile Page
A complete profile page layout with a sidebar containing user info and a main content area showing an <activity-feed>. Uses <layout-sidebar> with an <aside> for the responsive two-column layout.
<activity-feed> lays out each <article data-activity> with its icon rail and turns the authored <time> into a relative timestamp. The only page CSS is the stat-row rule shown under Profile Header.
Configuration
Profile patterns use these layout elements and attributes: