Muscle map
Original male and female anatomy, front and back, with muscle selection, training levels, comparison and zoom.
npx @swipeui/cli add muscle-mapWhen to use it
- Select trained muscle groups or heads and show a buyer-defined level scale.
- Compare before and after data on original front/back male/female artwork.
When not to use it
- Diagnostic or medical anatomy.
Installation
Installs with a Pro licence
Everything on this page is public except the source. Founder pre-sale opens around 5 January 2027.
Usage
import { MuscleMap } from '@/components/swipeui/special/muscle-map';
<MuscleMap
body="female"
detail="head"
sides="independent"
selectionMode="multiple"
levels={{ chest: 2, 'biceps-long-head:left': 3 }}
value={muscles}
onValueChange={setMuscles}
zoom
/>;Examples
select chooses whole groups. levels colours your data on a five-step scale.
compare shows before and after together. heads starts at the arms with
independent left and right heads. Every board offers male and female artwork and
front/back views. The retained art-review board inspects all four original drawings.
MuscleMap settings
| Prop | Does | Default |
|---|---|---|
body | male or female artwork | male |
view, defaultView, onViewChange | Controlled or initial front / back | front |
viewSwitch | Front/back switch, beside the muscle menu | true |
detail | Whole group or individual head keys | group |
selectionMode | single, multiple, none | single |
value, defaultValue, onValueChange | Array of selected keys | [] |
sides | linked or independent bilateral selection | linked |
levels | Numeric level by group, head or sided key | {} |
scale | Array of { value, label } | Five levels, values 0–4 |
legend | Numbered level labels and swatches | true |
compare | { before, after } level records | None |
labels | Selected name, cues and level | true |
zoom | Pinch, pan, double tap and icon buttons on the canvas | false |
listFallback | A named control for every selection key | true |
listStyle | One dropdown menu, or a wrap of 44pt chips under the body | menu |
hitTesting | SVG path presses or bounds / nearest-centroid tap fallback | path |
initialRegion | Group/head to inspect on first measured layout | None |
highlightSpeed | slow, normal, fast, or milliseconds between heads lighting | slow |
disabled | Prevent selection, view changes and gestures | false |
onMusclePress | { id, group, side, key } for a press, including none mode | None |
haptics | select, view, or all off | true |
palette | Illustration level swatches | MUSCLE_MAP_PALETTE |
messages | UI labels, region/group names, cues, default level names and announcement formatter | English |
motion | Shared motion override | App feel |
canvasWrapper | Wrap only each gesture canvas in a parent scroll lock | Fragment |
ref | zoomTo(key) and reset() | None |
className, style, testID | Root/part hooks | — |
Composition and behaviour
Keys are group IDs such as chest or head IDs such as biceps-long-head.
Independent bilateral regions append the subject's side: biceps-long-head:left.
Midline abs and erectors are drawn whole and use an unsuffixed key. View changes
retain selection, including keys not visible in the current view. Level precedence
is sided head, whole head, sided group, whole group; zero is a valid level.
<MuscleMap
body="female"
compare={{ before: previousLevels, after: currentLevels }}
scale={[
{ value: 10, label: 'Starting' },
{ value: 20, label: 'Trained' },
]}
selectionMode="none"
/>Each comparison canvas owns its gesture state. Chrome, the view switch, the level
legend, cues and the named list remain outside the zoomed layer. When embedding
in a scrolling screen, pass a canvasWrapper that locks scrolling only while a
finger touches the canvas; the list and controls below remain scrollable.
The named list is one dropdown by default (listStyle="menu"): a multi-select
when several muscles can be chosen, and a single dropdown otherwise. It needs the
app's OverlayProvider. listStyle="chips" keeps every muscle on screen instead.
The named-control fallback is the recommended accessible path. SVG path hit testing
varies by platform; hitTesting="bounds" offers a bounds/nearest-centroid fallback
without changing selection keys. Native path presses, VoiceOver and TalkBack still
need device verification. The body never flips in RTL. Reduce Motion removes the
lighting stagger and zoom travel while preserving direct manipulation and feedback.
All four original SVG drawings were authored in this repository without tracing,
imported vectors or raster underlays. Only their static data is public, exported
by scripts/muscle-art/export.ts to /demo/muscle-map/. Component, helper and hook
source remains Pro. The male-front art was approved at task 5a. The retained
MuscleArtReview takes body, view, group, head, wireframe, motion and root
hooks, plus inspect() and reset() on its ref.
These are fitness-interface illustrations, not diagnostic anatomy. Native accessibility, device motion checks and recordings remain pending.
Behavior and gestures
- Tap a muscle or a named list button to choose a group or head.
- Choose sides together or independently; front/back switches retain selections.
- Pinch, pan and double tap to inspect an individual head.
Accessibility
- The optional list fallback provides a named 44pt button for each selectable key.
- Levels are announced by name and listed with numbers as well as colours.
Motion
- Uses the
dragandtogglemotion roles, so it follows your app's feel. Passmotionto tune this one instance. - Group lighting is content-paced by highlightSpeed; each path paints on toggle.
- Direct zoom manipulation follows the fingers and settles through drag; Reduce Motion shows selection without stagger.
Performance
- Static SVG paths; only one zoom layer moves.
Notes for AI
- Level keys can name a group, head, or independent side such as biceps-long-head:left.
- Only four static art files are exempt public data; all renderer, helper and hook code remains Pro.
- Use initialRegion to inspect a group or head on first measured layout.
Compatibility
| Runs on | Supported |
|---|---|
| Expo SDK 57 | Yes |
| Expo SDK 58 | Yes |
| React Native CLI (with Expo modules) | Yes |
| Expo Go | Yes |
| iOS | Yes |
| Android | Yes |
This table describes API support and static bundle checks. Native runtime, device accessibility and bare Uniwind compatibility remain pending.