For AI agents: the complete documentation index is available at /llms.txt, the full documentation bundle is available at /llms-full.txt, and this page is available as Markdown at /examples/user-profile.md.

User Profile

A profile screen with an avatar, a badge, stats and an "About" card, plus a sheet for editing the bio. Look here for a view-then-edit screen.

Built with the UI components: Avatar, Badge, Card, Sheet, Input, Textarea, Label, Separator and Button.

What it shows

  • Avatar fallback — [fallback]="initials()" shows initials when there's no photo. initials is a computed() from the saved name.
  • Vertical separators — orientation="vertical" divides the Posts, Followers and Following stats.
  • Editing in a sheet — Edit Profile opens a Sheet that slides up from the bottom, so there's no navigation to a new screen.
  • Draft, then save — the sheet edits a copy, a Signal Form of its own bound with [formField]. Save copies it into name and bio through submit(), and Cancel closes the sheet without saving. Opening the sheet starts again from the saved values, with reset().
  • Card sections — a Card with a header and content groups the About text.