Plasmid Map
A circular plasmid: the backbone as a thin ring, features as rounded arcs that point the way they read, restriction sites around the outside, and a center that reads out the plasmid or the feature in focus.
Install
npx shadcn@latest add @nelumbo/plasmid-mapA plasmid
pGL3-Basic, a luciferase reporter. Names run along their arcs where they fit and sit outside with a leader where they do not; the unique cutters of its cloning site spread out so none overlap.
Selection
selectable makes the map one keyboard stop, like a chart: arrows go from feature to feature around the circle, Escape clears. The center reads out the feature in focus and the rest fade.
Point at a feature, or focus the map and use the arrow keys.
Narrow
Where there is no room for outside labels, the map keeps its arcs and moves the names to a legend.
Props
| Prop | Type | Default | Notes |
|---|---|---|---|
name, length | string, number | Shown in the center. | |
features | PlasmidFeature[] | start, end, name, strand (1, -1, 0), kind, color, description. start > end crosses the origin. | |
kind | "cds" | "promoter" | "origin" | "terminator" | "primer" | "marker" | "misc" | "misc" | Sets the default color; primers are thin. |
sites | PlasmidSite[] | position and name: ticks on the backbone, labelled outside. | |
labels | "auto" | "outside" | "legend" | "auto" | Auto uses outside labels from 520 px wide, a legend below that. |
ruler | boolean | true | Base numbers inside the ring. |
selectable / onActiveChange | boolean, (focus | null) => void | Keyboard and pointer focus on features. | |
Helpers | uniqueSites, featureLength, featureColor | Enzymes that cut once in a circular sequence; lengths across the origin. |