ProfilePicker
The "who is using this?" screen of an account several people share.
View code
<form method="post">
<ProfilePicker title="Who's watching?" footer="Each profile keeps its own list.">
{profiles.map((profile) => (
<ProfilePicker.Profile
name={profile.name}
avatar={<img src={profile.avatar} alt="" />}
formAction={`/profiles/${profile.id}`}
current={profile.id === current}
/>
))}
</ProfilePicker>
</form>Demo apps
Whole pages built only from @sdxc/ui, each for an invented product with its own palette and type. They open in a new tab.
- Food deliveryBocadoBocado, an invented food delivery app: restaurants by cuisine and delivery time, search with filters, menus with options, a cart, checkout and live order tracking on a drawn map./demo/apps/bocado
- Issue trackerCairnCairn, an invented issue tracker: grouped issue lists with filters in the address, a drag-and-drop board, projects on a roadmap, cycles with burn-up charts and an inbox./demo/apps/cairn
- Social networkChorusChorus, an invented social network: a live timeline with pictures, link cards, polls and threads, profiles, grouped notifications, search and messages./demo/apps/chorus
- Code hostDeltaDelta, a code host whose one repository is its own source: a file tree beside the code, line links, blame and the commits list, every file and commit read from git when the site is built./demo/apps/delta
- Online storeHangwellHangwell, an invented poster shop: collections with facet filters, product pages with format, size and frame pickers and a room preview, a bag, a checkout that adapts to print files, order tracking, downloads and returns./demo/apps/hangwell
- CMSInkwellInkwell, a demo CMS built from @sdxc/ui/app: posts with count tabs and quick edit, an editor with a quiet save status and a loud Publish, media and settings./demo/apps/inkwell
- Music streamingMurmurMurmur, an invented music service: home shelves, search by genre, a library, albums, playlists and artists, with a player that keeps playing while you browse./demo/apps/murmur
- Team chatParleyParley, an invented team chat: channels and direct messages with unread and mention badges, threads, reactions, edits, pins, search, a quick switcher and teammates who type and post live./demo/apps/parley
- Photo and video networkPinholePinhole, an invented social network for photographs and short videos: a feed under a story tray, full-screen stories, a vertical reels feed, profiles with highlights, Explore and posts with comments./demo/apps/pinhole
- Ops dashboardPulsePulse, an invented ops dashboard: Northwind's services with live filters, a peek sheet and a bulk bar, metrics that switch one chart, incidents, deploys and settings./demo/apps/pulse
- Support inboxRelayRelay, an invented support inbox: mailboxes, conversations and the open conversation on one screen, with contacts, reports and settings./demo/apps/relay
- CalendarSundialSundial, an invented calendar: day, week and month views, an agenda, events you drag, resize and create on the grid, a second time zone, and a find-a-time view across a team in five zones./demo/apps/sundial
- Chat assistantTernTern, an invented chat assistant: conversations with streamed replies, code and tables, projects, a canvas, sharing and settings./demo/apps/tern
- Banking & budgetsTuppenceTuppence, an invented personal bank: multi-currency accounts, a statement by day with search and splits, spending and budgets, savings pots, bills ahead, cards that freeze and a transfer flow, all with fake money./demo/apps/tuppence
- Streaming serviceVesperVesper, an invented streaming service: profiles, a home of sideways shelves under a billboard, series with seasons and episodes, search, My List and a theater player./demo/apps/vesper
- Travel bookingWayfernWayfern, an invented travel app: stays, flights, cars and packages from one search, results on a real map, seat maps and boarding passes, and one itinerary of trips that exports to calendars./demo/apps/wayfern
Every demo, landings and docs sites alike, is listed in the demo gallery.
Installation
An ordinary dependency: install it, import the theme once, and import the component where it is used.
npm add @sdxc/ui remiximport "@sdxc/ui/theme.css";Usage
import { ProfilePicker } from "@sdxc/ui/app";Renders the picker centred on the page: the question as its heading, then two profiles to a row on a phone and up to five on a wider screen.
Composition
The parts the component publishes, each a static property of the host.
ProfilePickerProfilePicker.ProfileOne profile: its avatar and name as a submit button.
Props
Read from the component's own types, so every prop, every default and every allowed value is listed.
| Prop | Type | Required | Description |
|---|---|---|---|
title | RemixNode | Yes | The question, such as "Who's watching?", which names the section. |
footer | RemixNode | No | A line under the grid, such as what a profile keeps apart. |
children | RemixNode | Yes | ProfilePicker.Profile elements. |
Also accepts everything in Omit<TagProps<"section">, "title">.
ProfilePicker.Profile
| Prop | Type | Required | Description |
|---|---|---|---|
name | string | Yes | The profile's name, the button's text. |
avatar | RemixNode | Yes | The profile's picture, drawn square at the button's width. |
formAction | string | No | Where the pick posts, for a form holding every profile; see formaction. |
current | boolean | No | Marks the profile in use with aria-current. |
Also accepts everything in Omit<TagProps<"button">, "children" | "name">.