Exclusifbêta
Exposure <mv-exposure>
Jauge de visibilité pour les réglages de partage et de confidentialité (boîtes de dialogue de partage, audience d’une publication, confidentialité du profil, visibilité d’un projet, partage d’agenda, liens de fichiers) qui lit les contrôles qu’elle enveloppe et indique à chacun à quel point il est exposé avant de valider. Boutons radio, options, interrupteurs, champs texte et listes de personnes portent une table de score déclarative : data-exposure="3" est un niveau d’audience (le plus large l’emporte), data-exposure="+0.4" un modificateur qui déplace la lecture à l’intérieur de sa tranche sans jamais changer l’audience (un lien qui n’expire jamais, des téléchargements autorisés, un invité externe) ; une fonction score(state) peut aussi prendre entièrement le relais. Le résultat est une lecture unique et sereine, de « Vous seul » à « Public sur Internet » : une lumière ronde qui grandit et s’intensifie avec l’audience, une piste en escalier qui monte tranche après tranche, la tranche en toutes lettres et l’audience détaillée (« Visible par : vous, 4 personnes et toute personne de chez Acme disposant du lien »). En dessous, les facteurs qui font réellement monter la lecture sont classés par impact, chacun avec une réduction en un clic (« Le lien n’expire jamais → Expirer dans 7 jours ») qui modifie le vrai contrôle et déclenche ses événements input/change. Passer à une tranche supérieure émet un mv-exposure-raise annulable (une politique d’espace de travail peut s’y opposer, et les contrôles sont alors restaurés) ; les tranches égales ou supérieures à confirm restent en attente, hachurées et cerclées, avec une confirmation en ligne ou flottante, et bloquent l’envoi natif du formulaire jusqu’à confirmation ou annulation. Trois variantes : bar (lecture complète avec les facteurs), gem (compacte, pour les barres d’outils et les zones de rédaction, peut surveiller une autre région avec for) et inline (une phrase avec une minuscule jauge en escalier).
| Catégorie | Formulaires |
|---|---|
| Type | Web Component (<mv-exposure>) |
| Statut | bêta |
| Kit | Confiance et vie privée |
| Installe aussi | button |
| Keywords | exclusive, culture, privacy, sharing, share-dialog, visibility, audience, permissions, access, public, link-sharing, gauge, meter, risk, confirmation, policy, settings, form |
When to use
- A share dialog must make clear who can open a document or file before the user copies the link or clicks Done
- A post, profile or event audience selector should spell out the real reach, not just the option name
- Several small settings (link expiry, downloads, guests) add up to more exposure than any single control suggests
- Making something public must be deliberate and confirmed, or vetoed by an organization policy
Avoid when
- You just need to show a measured quantity in a range (storage used, a score, completion) → use Progress instead
- Access is temporary and elevated (admin mode, a time-boxed share) and must end on time → use Midnight instead
- There is a single public/private toggle with no nuance: a switch with a clear description says it all → use Switch instead
Installation
node scripts/add.mjs exposure --out ./src/marvelousAgent IA avec le serveur MCP Marvelous UI : install_components({ slugs: ["exposure"], target_dir: "<absolute path>/src/marvelous", framework: "react" }).
Fichiers copiés (dépendances comprises) : tokens/tokens.css, core/base.css, core/dom.js, core/element.js, core/motion.js, core/position.js, components/exposure/exposure.js, components/exposure/exposure.css, components/button/button.css.
Utilisation
Démarrage rapide, le balisage minimal qui fonctionne :
<mv-exposure org="Acme">
<select aria-label="Share with">
<option data-exposure="0">Only me</option>
<option data-exposure="2" selected>Everyone at Acme</option>
<option data-exposure="4">Public on the internet</option>
</select>
</mv-exposure>Balisage de référence : partez de celui-ci et personnalisez-le avec les attributs, data-* et les variables CSS :
<div id="ex-demo" style="width:min(100%,62rem);margin-inline:auto">
<style>
#ex-demo { display:grid; grid-template-columns:minmax(0,1.3fr) minmax(0,1fr); gap:1.25rem; align-items:start }
#ex-demo .ex-card { display:grid; gap:1rem; padding:1.25rem; border:1px solid var(--mv-border); border-radius:var(--mv-radius-xl); background:var(--mv-surface); box-shadow:var(--mv-shadow-sm) }
#ex-demo .ex-side { display:grid; gap:1.25rem; align-content:start }
#ex-demo .ex-head h3, #ex-demo .ex-head h4 { margin:0; font-size:1rem; font-weight:650; letter-spacing:-.01em }
#ex-demo .ex-head h4 { font-size:.9375rem }
#ex-demo .ex-head p { margin:.125rem 0 0; color:var(--mv-fg-muted); font-size:.8125rem }
#ex-demo .ex-form { display:grid; gap:1rem; margin:0 }
#ex-demo .ex-label { display:block; margin-bottom:.375rem; color:var(--mv-fg); font-size:.8125rem; font-weight:600 }
#ex-demo .ex-people { display:grid; gap:.125rem; margin:0; padding:0; list-style:none }
#ex-demo .ex-person { display:grid; grid-template-columns:auto minmax(0,1fr) auto; align-items:center; gap:.625rem; padding:.3125rem 0; font-size:.8125rem }
#ex-demo .ex-person b { display:block; font-weight:550 }
#ex-demo .ex-person small { display:block; overflow:hidden; color:var(--mv-fg-muted); font-size:.75rem; text-overflow:ellipsis; white-space:nowrap }
#ex-demo .ex-role { display:flex; align-items:center; gap:.375rem; color:var(--mv-fg-muted); font-size:.75rem }
#ex-demo .ex-access .mv-choice-description { font-size:.75rem }
#ex-demo .ex-row { display:grid; grid-template-columns:minmax(0,11rem) minmax(0,1fr); gap:1rem; align-items:end }
#ex-demo .ex-row .mv-choice { padding-bottom:.125rem }
#ex-demo .ex-foot { display:flex; align-items:center; justify-content:space-between; gap:.75rem 1rem; flex-wrap:wrap; padding-top:1rem; border-top:1px solid var(--mv-border) }
#ex-demo .ex-foot .mv-choice { font-size:.8125rem }
#ex-demo .ex-actions { display:flex; gap:.5rem; margin-inline-start:auto }
#ex-demo .ex-log { margin:0; min-height:1.1rem; color:var(--mv-fg-subtle); font:.75rem/1.45 var(--mv-font-mono) }
#ex-demo .ex-post { display:grid; gap:.75rem }
#ex-demo .ex-post-tools { display:flex; align-items:center; gap:.75rem; flex-wrap:wrap }
#ex-demo .ex-post-tools .mv-select { width:auto; min-width:10.5rem }
#ex-demo .ex-post-tools .mv-choice { font-size:.8125rem }
#ex-demo .ex-post-foot { display:flex; align-items:center; justify-content:space-between; gap:.75rem; padding-top:.75rem; border-top:1px solid var(--mv-border) }
#ex-demo .ex-cal { display:grid; gap:.875rem }
#ex-demo .ex-cal-grid { display:grid; grid-template-columns:1fr 1fr; gap:.75rem }
#ex-demo .ex-cal-reading { padding:.625rem .75rem; border-radius:var(--mv-radius-md); background:var(--mv-bg-subtle); font-size:.8125rem; line-height:1.5 }
@media (max-width:52rem) { #ex-demo { grid-template-columns:minmax(0,1fr) } }
@media (max-width:30rem) { #ex-demo .ex-row, #ex-demo .ex-cal-grid { grid-template-columns:minmax(0,1fr) } }
</style>
<!-- 1 · Share dialog: bar variant, reading on top, factors with one-click reductions, public needs confirmation -->
<section class="ex-card" aria-labelledby="ex-share-title">
<div class="ex-head">
<h3 id="ex-share-title">Share “Q4 launch plan”</h3>
<p>Acme · Marketing › Launches · edited by Maya Chen 2 hours ago</p>
</div>
<mv-exposure id="ex-share" org="Acme" confirm="4" label="Who can see this document">
<form class="ex-form" id="ex-share-form">
<div data-exposure-reading></div>
<div>
<span class="ex-label" id="ex-people-label">People with access</span>
<ul class="ex-people" aria-labelledby="ex-people-label" data-exposure="1" data-exposure-count=".ex-person" data-exposure-audience="{count} people" data-exposure-audience-one="1 person">
<li class="ex-person">
<span class="mv-avatar" data-size="sm" data-variant="tinted" aria-hidden="true"><span class="mv-avatar-fallback">MC</span></span>
<span><b>Maya Chen (you)</b><small>[email protected]</small></span>
<span class="ex-role">Owner</span>
</li>
<li class="ex-person">
<span class="mv-avatar" data-size="sm" data-variant="tinted" aria-hidden="true"><span class="mv-avatar-fallback">DA</span></span>
<span><b>Diego Alvarez</b><small>[email protected]</small></span>
<span class="ex-role">Editor</span>
</li>
<li class="ex-person">
<span class="mv-avatar" data-size="sm" data-variant="tinted" aria-hidden="true"><span class="mv-avatar-fallback">PN</span></span>
<span><b>Priya Natarajan</b><small>[email protected]</small></span>
<span class="ex-role">Commenter</span>
</li>
<li class="ex-person" id="ex-guest" data-exposure="+0.2" data-exposure-factor="A guest outside Acme has access" data-exposure-reduce-label="Remove guest">
<span class="mv-avatar" data-size="sm" data-variant="tinted" aria-hidden="true"><span class="mv-avatar-fallback">JO</span></span>
<span><b>Jordan Okafor</b><small>[email protected]</small></span>
<span class="ex-role"><span class="mv-badge" data-variant="warning" data-size="sm">Guest</span>
<button type="button" class="mv-button" data-variant="ghost" data-size="icon" data-exposure-remove aria-label="Remove Jordan Okafor" style="width:1.75rem;height:1.75rem">
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" aria-hidden="true"><path d="M6 6l12 12M18 6 6 18"/></svg>
</button>
</span>
</li>
</ul>
</div>
<fieldset class="mv-choice-group ex-access">
<legend>General access</legend>
<label class="mv-choice">
<input type="radio" class="mv-radio" name="access" value="restricted" data-exposure="0">
<span class="mv-choice-text"><span class="mv-choice-title">Restricted</span><span class="mv-choice-description">Only the people above can open it</span></span>
</label>
<label class="mv-choice">
<input type="radio" class="mv-radio" name="access" value="org" checked data-exposure="2" data-exposure-audience="anyone at Acme with the link" data-exposure-factor="Anyone at Acme with the link can open it" data-exposure-reduce="restricted" data-exposure-reduce-label="Restrict">
<span class="mv-choice-text"><span class="mv-choice-title">Acme</span><span class="mv-choice-description">Anyone at Acme with the link</span></span>
</label>
<label class="mv-choice">
<input type="radio" class="mv-radio" name="access" value="link" data-exposure="3" data-exposure-audience="anyone with the link" data-exposure-factor="Anyone with the link can open it, no sign-in" data-exposure-reduce="org" data-exposure-reduce-label="Limit to Acme">
<span class="mv-choice-text"><span class="mv-choice-title">Anyone with the link</span><span class="mv-choice-description">No sign-in required</span></span>
</label>
<label class="mv-choice">
<input type="radio" class="mv-radio" name="access" value="public" data-exposure="4" data-exposure-audience="anyone on the internet" data-exposure-factor="Listed publicly and indexed by search engines" data-exposure-reduce="link" data-exposure-reduce-label="Unlist" data-exposure-confirm="Anyone can find “Q4 launch plan” in search results and open it without signing in, including unreleased dates and pricing." data-exposure-confirm-label="Make public">
<span class="mv-choice-text"><span class="mv-choice-title">Public on the web</span><span class="mv-choice-description">Searchable, no sign-in required</span></span>
</label>
</fieldset>
<div class="ex-row">
<div>
<label class="ex-label" for="ex-expires">Link expires</label>
<select class="mv-select" id="ex-expires" name="expires" data-size="sm">
<option value="never" selected data-exposure="+0.4" data-exposure-factor="The link never expires" data-exposure-reduce="7d" data-exposure-reduce-label="Expire in 7 days">Never</option>
<option value="30d" data-exposure="+0.2" data-exposure-factor="The link stays valid for 30 days" data-exposure-reduce="7d" data-exposure-reduce-label="Shorten to 7 days">In 30 days</option>
<option value="7d">In 7 days</option>
<option value="1d">In 24 hours</option>
</select>
</div>
<label class="mv-choice" data-control="end">
<input type="checkbox" role="switch" class="mv-switch" name="download" checked data-exposure="+0.2" data-exposure-factor="Viewers can download, print and copy">
<span class="mv-choice-text"><span class="mv-choice-title">Allow downloads</span><span class="mv-choice-description">Viewers can download, print and copy</span></span>
</label>
</div>
<div class="ex-foot">
<label class="mv-choice"><input type="checkbox" role="switch" class="mv-switch" data-size="sm" id="ex-policy"> Workspace policy: no public documents</label>
<span class="ex-actions">
<button type="button" class="mv-button" data-variant="outline" data-size="sm" id="ex-reset">Reset</button>
<button type="submit" class="mv-button" data-size="sm">Done</button>
</span>
</div>
</form>
</mv-exposure>
<p class="ex-log" id="ex-log" aria-live="polite">Pick “Public on the web”, or reduce a factor.</p>
</section>
<div class="ex-side">
<!-- 2 · Post composer: gem variant watching the composer with `for`, custom bands -->
<section class="ex-card" aria-labelledby="ex-post-title">
<div class="ex-head">
<h4 id="ex-post-title">New post</h4>
<p>Posting as Maya Chen</p>
</div>
<div class="ex-post" id="ex-post">
<textarea class="mv-textarea" rows="3" aria-label="Post text">Shipped the new onboarding flow today. Huge thanks to Diego and Priya for three weeks of late-night testing!</textarea>
<div class="ex-post-tools">
<select class="mv-select" data-size="sm" aria-label="Audience">
<option value="me" data-exposure="0">Only me</option>
<option value="close" data-exposure="1" data-exposure-audience="12 close friends">Close friends</option>
<option value="friends" selected data-exposure="2" data-exposure-audience="your 348 friends">Friends</option>
<option value="fof" data-exposure="3" data-exposure-audience="their friends, about 41,000 people">Friends of friends</option>
<option value="public" data-exposure="4" data-exposure-audience="anyone, on or off the app" data-exposure-confirm="Anyone can see, share and embed this post, even without an account." data-exposure-confirm-label="Post publicly">Public</option>
</select>
<label class="mv-choice"><input type="checkbox" class="mv-checkbox" data-exposure="+0.3" data-exposure-factor="Your location is attached"> Add location · San Francisco</label>
</div>
</div>
<div class="ex-post-foot">
<mv-exposure for="ex-post" id="ex-gem" variant="gem" confirm="4" label="Post audience" bands="Only you, Close friends, Friends, Friends of friends, Public"></mv-exposure>
<button type="button" class="mv-button" data-size="sm">Post</button>
</div>
</section>
<!-- 3 · Calendar sharing: inline variant, reading placed where the author wants it -->
<section class="ex-card" aria-labelledby="ex-cal-title">
<div class="ex-head">
<h4 id="ex-cal-title">Calendar sharing</h4>
<p>Work calendar · Maya Chen · Pacific Time</p>
</div>
<mv-exposure variant="inline" org="Acme" label="Calendar visibility" class="ex-cal">
<div class="ex-cal-grid">
<div>
<label class="ex-label" for="ex-cal-who">Share with</label>
<select class="mv-select" id="ex-cal-who" data-size="sm">
<option value="none" data-exposure="0">Nobody</option>
<option value="team" selected data-exposure="1" data-exposure-audience="your 8 teammates">My team</option>
<option value="org" data-exposure="2" data-exposure-audience="everyone at Acme">Everyone at Acme</option>
<option value="public" data-exposure="4" data-exposure-audience="anyone with the public URL">Public URL</option>
</select>
</div>
<div>
<label class="ex-label" for="ex-cal-detail">They see</label>
<select class="mv-select" id="ex-cal-detail" data-size="sm">
<option value="busy">Free/busy only</option>
<option value="titles" data-exposure="+0.4">Event titles</option>
<option value="all" selected data-exposure="+0.8">All details</option>
</select>
</div>
</div>
<div class="ex-cal-reading" data-exposure-reading></div>
</mv-exposure>
</section>
</div>
<script type="module">
const share = document.getElementById("ex-share");
const form = document.getElementById("ex-share-form");
const log = document.getElementById("ex-log");
const policy = document.getElementById("ex-policy");
const expires = document.getElementById("ex-expires");
const guest = document.getElementById("ex-guest");
const gem = document.getElementById("ex-gem");
const say = (t) => { log.textContent = t; };
// Icons that fit a social audience better than the default document scale.
gem.bands = [
{ label: "Only you", icon: "lock" },
{ label: "Close friends", icon: "people" },
{ label: "Friends", icon: "people" },
{ label: "Friends of friends", icon: "link" },
{ label: "Public", icon: "globe" },
];
// A restricted document has no link: its expiry no longer matters.
const syncExpiry = () => { expires.disabled = form.elements.access.value === "restricted"; };
form.addEventListener("change", syncExpiry);
syncExpiry();
// The guest chip's own remove button (the reduction runs it too).
const removeGuest = guest.querySelector("[data-exposure-remove]");
removeGuest.addEventListener("click", () => guest.remove());
share.addEventListener("mv-exposure-raise", (e) => {
if (policy.checked && e.detail.to === 4) {
e.preventDefault();
say("Blocked by workspace policy: public documents are turned off.");
return;
}
say(`Raise: ${e.detail.fromLabel} → ${e.detail.toLabel}${e.detail.needsAck ? " (needs confirmation)" : ""}`);
});
share.addEventListener("mv-exposure-change", (e) => {
say(`${e.detail.acknowledged ? "Confirmed" : "Now"}: ${e.detail.label} · ${e.detail.value.toFixed(1)} of 4`);
});
form.addEventListener("submit", (e) => {
e.preventDefault();
if (!share.pending) say(`Saved: ${share.bandLabel}. ${share.audience}.`);
});
// Reset the scenario (and put the guest back).
const initial = { access: "org", expires: "never", download: true };
document.getElementById("ex-reset").addEventListener("click", () => {
if (!guest.isConnected) share.querySelector(".ex-people").append(guest);
form.elements.access.value = initial.access;
form.elements.download.checked = initial.download;
syncExpiry();
expires.value = initial.expires;
share.refresh();
say("Scenario reset.");
});
</script>
</div>Référence culturelle
Thief: The Dark Project, Looking Glass Studios (1998, jeu). Un indicateur lumineux en bas de l’écran montre à chaque instant à quel point le joueur est visible, de caché dans l’ombre à pleinement éclairé : il connaît son exposition avant de faire un pas. Dans l’interface, les contrôles d’un formulaire de partage ou de confidentialité alimentent une lecture unique qui s’éclaire à mesure que l’audience s’élargit, précise qui peut voir l’élément, liste ce qui la fait monter avec des réductions en un clic, et fait de la tranche la plus lumineuse une étape délibérée et confirmée.
API
Attributes
| Name | Type | Default | Description |
|---|---|---|---|
variant | bar | gem | inline | bar | bar: the full reading (light, band, audience, stepped track, scale, factors) in a subtle card. gem: the round light with the band and audience next to it, no card, factors hidden, acknowledgement floats. inline: one sentence led by a tiny stepped gauge, factors hidden, acknowledgement floats. |
org | string | Organization name used in the default band “Anyone at {org}” and in {org} placeholders of audience and factor texts. Without it the band reads “Anyone in your organization”. | |
confirm | band index | "top" | (empty) | Bands at or above this index need an explicit acknowledgement before they apply; empty or "top" means the last band only. Without the attribute nothing needs confirming (mv-exposure-raise still fires). | |
for | id | Watch another element (a form, a composer) instead of the component’s children; the component then only holds the reading. Resolved in the component’s root node when it connects or when the attribute changes. | |
bands | comma-separated labels | Only you, Specific people, Anyone at {org}, Anyone with the link, Public on the internet | Band labels from the narrowest to the widest audience (at least 2). Icons are picked along lock, people, building, link, globe; use the bands property to choose them. |
label | string | Visibility | Accessible name of the meter, also shown as the small caption above the band in the bar variant. |
show-factors | "true" | "false" | Show or hide the factor list. Default: shown in bar, hidden in gem and inline. | |
data-exposure | number | +number | -number | On any radio, checkbox, switch, option, text field or element in the watched region. A plain number is an audience level, active when the control is checked/selected/filled (or the element is present and not hidden); the highest active level sets the band. A signed number is a modifier: modifiers add up and move the reading inside the band (capped just below the next band), never across it. Disabled, hidden or inert contributors are ignored. | |
data-exposure-audience | string | Words added to the audience sentence while the contributor is active (“anyone at {org} with the link”). {count} and {org} are replaced; data-exposure-audience-one is used when the count is 1. | |
data-exposure-count | CSS selector | On a container (a people list): the number of matching descendants that are not hidden. The container is active when the count is above 0 and {count} is available to its audience text. | |
data-exposure-factor | string | Makes an active contributor a listed factor (“The link never expires”) whenever removing it would lower the reading. Factors are sorted by impact. | |
data-exposure-reduce | string | The one-click reduction of a factor. Radio: value of the radio to check instead. Option: value to select in its select. Checkbox or switch: unchecked (no value needed). Text field: the value to set (empty clears it). Other elements: the reduction clicks their [data-exposure-remove] button, so your own removal logic runs. | |
data-exposure-reduce-label | string | Label of the reduction button (“Expire in 7 days”). Defaults: “Switch to {option}”, “Turn off”, “Clear”, “Remove”. | |
data-exposure-confirm / data-exposure-confirm-label | string | On the contributor that opens a guarded band: the acknowledgement text (who can reach it and what that means) and the confirm button label (“Make public”). | |
data-exposure-reading | (marker) | On an empty child: the reading is rendered inside it instead of being appended at the end of the component. | |
data-band / data-pending | set by the component | Current band index and pending state, on the host (styleable). |
Properties
| Name | Type | Description |
|---|---|---|
value | number | Current reading, from 0 to bands.length - 1 (read-only). |
band / bandLabel | number / string | Index and label of the current band (read-only). |
audience | string | The audience sentence, e.g. “Visible to: you, 4 people, and anyone at Acme with the link” (read-only). |
factors | Array<{ label, impact, element, reduceLabel }> | Factors raising the reading, most impactful first (read-only). |
pending | boolean | True while a guarded band waits for acknowledge() or revert() (read-only). Check it in your own save handler if the save does not go through a native form submission. |
bands | Array<string | { label, icon? }> | Band list; icon is one of lock, people, building, link, globe. Reading it returns the resolved objects. Setting a string sets the attribute. |
score | (state) => number | { value?, audience?, factors? } | void | Custom scoring. state: { values (controls by name: radio value, checkbox boolean or array, select value), value, band, bands, audience (string[]), factors, contributors }. Return a number to replace the reading, or an object to replace the value, the audience parts and/or the factors ({ label, impact?, reduceLabel?, reduce?: () => void, confirm? }). |
strings | Partial<Record<string, string>> | Overrides for every visible text and announcement (keys: label, you, orgFallback, visibleTo ({list}), factorsTitle, pending, ackTitle ({band}), ackText, ackConfirm, ackCancel, reduceTo ({option}), reduceToggle, reduceRemove, reduceClear, valueText, valueTextPending, announceUp, announceDown, announceSame, announcePending, announceConfirmed, announceReverted, announceBlocked, announceSubmit). English defaults. |
Methods
| Name | Description |
|---|---|
refresh() | Re-reads the controls. Needed only after changing them from code without firing input/change events (frameworks setting .checked or .value); DOM changes (chips added or removed, hidden, disabled) are observed automatically. |
acknowledge() | Accepts the pending band (same as the confirm button). Returns false when nothing is pending. |
revert() | Restores every watched form control to the last accepted state and fires their input/change events; drops a pending band. Changes made outside form controls (a chip added by the app) cannot be undone by the component. |
reduce(indexOrElement) | Applies a factor’s reduction from code (index in factors, or its contributor element). Emits the cancelable mv-exposure-reduce; returns false if cancelled or impossible. |
Events
| Name | Description |
|---|---|
mv-exposure-raise | Cancelable, before a rise into a higher band is applied. detail: { from, to, fromLabel, toLabel, value, audience, needsAck, source (the control that changed, or null) }. preventDefault() vetoes it: the controls go back to the last accepted state and the refusal is announced. |
mv-exposure-change | The accepted reading changed (band, value, audience or factors). detail: { value, band, label, audience, factors: [{ label, impact }], acknowledged }. Not emitted for the initial reading. |
mv-exposure-reduce | Cancelable, before a factor’s reduction runs. detail: { label, impact, element }. |
Content structure
| Name | Description |
|---|---|
(content) | The sharing or privacy controls to read (unless for is set). The component never restyles them; it only reads them and, for reductions or reverts, sets their value and fires input/change. |
CSS classes
| Name | Description |
|---|---|
mv-exposure | The reading (data-variant, data-band, data-top, data-pending, data-flare during a rise). |
mv-exposure-gauge | role="meter" wrapper: -head (-gem with -gem-light and -gem-icon, -caption, -band, -tag, -audience), -track (-step, -step-fill; data-lit), -scale. |
mv-exposure-factors | Factor list: -factors-title, -list, -factor (-factor-icon, -factor-label, .mv-exposure-reduce button). |
mv-exposure-ack | Acknowledgement group: -ack-icon, -ack-title, -ack-text, -ack-actions (.mv-exposure-cancel, .mv-exposure-confirm). data-floating when shown as a popover (gem and inline). |
CSS variables
| Name | Default | Description |
|---|---|---|
--mv-exposure-low | var(--mv-fg-subtle) | Tone of the narrowest audience: the unlit end of the scale. |
--mv-exposure-high | var(--mv-warning) | Tone the light warms up to as the audience widens (bands are mixed between low and high). |
--mv-exposure-peak | color-mix(warning, danger 55%) | Tone of the widest band, the pending tag and the acknowledgement. |
Accessibility
The reading is a role="meter" named by label (“Visibility”), with aria-valuenow/min/max and an aria-valuetext that is the whole reading in words: “Anyone at Acme. Visible to: you, 4 people, and anyone at Acme with the link.” (with “needs confirmation” while pending). Its visible children are presentational, so screen readers get one coherent sentence instead of fragments. Band changes are announced once in a polite live region, debounced so arrowing through a radio group does not chatter (“Visibility raised to Anyone with the link. …”); a guarded band, a veto and a blocked submission are announced assertively. Focus is never moved when a control changes (arrow keys change radios immediately, so stealing focus would break keyboard use): the acknowledgement appears right after the reading in the DOM, as a labelled and described group with “Keep previous setting” and the confirm button; Escape inside it keeps the previous setting, and after either choice focus returns to the control that raised the band. Submitting the surrounding form while pending is prevented and moves focus to the confirm button. Reduction buttons are real buttons whose accessible name includes the factor (“Expire in 7 days: The link never expires”); after a reduction focus moves to the next factor (or to the meter) and the new reading is announced. The level is never carried by color alone: each band has its own words and icon (lock, people, building, link, globe), the light grows in size, the steps grow in height, and a pending band adds a dashed ring, a hatched step and a “Needs confirmation” tag. Forced colors: steps and the light switch to Canvas/CanvasText outlines with a Highlight fill and ring. Reduced motion (OS or data-motion="reduce"): no flare, the light and steps change without animating.