Salta ai contenuti
Magma Design System
Policy ai<mds-policy-ai>Generato da @maggioli-design-system/magma@2.3.0dist/documentation.json. Incapsulamento: shadow.
Questa pagina è generata dai pacchetti Magma, documentati solo in inglese.
Il primo esempio della pagina Pattern, dal vivo. Cambia le sue proprietà qui sotto e l'anteprima le segue; Ripristina riporta l'esempio com'era.
Proprietà
variantenumSets the variant type of the component
descriptionstringSets the description to custom component long text
headlinestringSets the headline to custom component text
hrefstringSets the pointing URL of the component
Panoramica
The <mds-policy-ai> web component is the Magma Design System disclosure marker that flags AI-generated content as produced by MIA (Maggioli’s artificial intelligence) and links to the official AI usage policy. It is a presentational compound component with no native HTML primitive, rendering one of four interchangeable surfaces (icon, chip, card, banner).
Semantic Behavior
Variant-exclusive rendering: Exactly one surface is mounted per the variant value, exposed through the matching shadow part (icon, chip, card, banner).Localization: Supplies all default copy (headline, description, link labels) in el, en, es, it, resolved from the host language.Policy navigation: Every variant routes the user to the policy href - the icon variant opens it in a new tab on click, while the other variants embed a button link to it.Content fallbacks: headline and description override the localized defaults where the active variant uses them; otherwise the built-in MIA disclosure text is shown.
Properties & Visual Configurations
variant selects the disclosure surface and is the primary configuration knob. Each value carries a distinct placement intent: 'chip' (default): a compact “Generated with MIA” chip with a hover dropdown holding the disclaimer and policy link - for inline placement next to generated text.'icon': a minimal help glyph with a tooltip - for the most space-constrained contexts.'card': a small card pairing the disclaimer with a policy button - for sidebars or standalone blocks.'banner': a full-width banner with title, description, and action - for prominent page-level notices. headline sets the short title used by the chip, icon, and banner surfaces; description sets the longer disclaimer body shown across the variants that expose it.href points to the AI policy page and defaults to the Maggioli EU AI-regulation article; override it to target a tenant-specific policy. The internal surfaces are fixed to variant="ai" of their underlying Magma components (the chip at its default strong tone, the banner and the buttons at tone="weak") and are not configurable from this component; the shared variant/tone ladder is documented in agents/variants.md.
Dipendenze
Usa: mds-help, mds-text, mds-chip, mds-dropdown, mds-button, mds-icon, mds-banner