@supersoniks/concorde 5.0.4 → 5.0.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.agents/skills/concorde-component-docs/SKILL.md +194 -0
- package/.agents/skills/concorde-component-docs/template.md +45 -0
- package/ai/cursor/rules/concorde-theme.mdc +1 -1
- package/ai/cursor/rules/concorde.mdc +1 -1
- package/ai/skills/concorde/SKILL.md +1 -1
- package/ai/skills/concorde-theme/SKILL.md +21 -10
- package/build-infos.json +1 -1
- package/concorde-core.bundle.js +528 -534
- package/concorde-core.es.js +4257 -4212
- package/dist/concorde-core.bundle.js +528 -534
- package/dist/concorde-core.es.js +4257 -4212
- package/dist/docs-mock-api-sw.js +2 -0
- package/dist/docs-mock-api-sw.js.map +2 -2
- package/docs/assets/index-CD4WyL6o.css +1 -0
- package/docs/assets/{index-D8MVWqY6.js → index-wVZpLVYW.js} +1221 -1350
- package/docs/crawl/core/components/ui/alert/alert.html +172 -71
- package/docs/crawl/core/components/ui/alert-messages/alert-messages.html +113 -5
- package/docs/crawl/core/components/ui/badge/badge.html +157 -79
- package/docs/crawl/core/components/ui/button/button.html +1 -0
- package/docs/crawl/core/components/ui/captcha/captcha.html +90 -8
- package/docs/crawl/core/components/ui/card/card.html +222 -68
- package/docs/crawl/core/components/ui/divider/divider.html +117 -31
- package/docs/crawl/core/components/ui/form/fieldset/fieldset.html +232 -101
- package/docs/crawl/core/components/ui/form/form-actions/form-actions.html +95 -52
- package/docs/crawl/core/components/ui/form/form-layout/form-layout.html +97 -38
- package/docs/crawl/core/components/ui/form/input/input.html +3 -3
- package/docs/crawl/core/components/ui/form/textarea/textarea.html +3 -3
- package/docs/crawl/core/components/ui/group/group.html +60 -38
- package/docs/crawl/core/components/ui/icon/icon.html +136 -47
- package/docs/crawl/core/components/ui/image/image.html +244 -56
- package/docs/crawl/core/components/ui/link/link.html +67 -9
- package/docs/crawl/core/components/ui/loader/loader.html +97 -23
- package/docs/crawl/core/components/ui/menu/menu.html +162 -90
- package/docs/crawl/core/components/ui/modal/modal.html +275 -50
- package/docs/crawl/core/components/ui/pop/pop.html +260 -66
- package/docs/crawl/core/components/ui/progress/progress.html +103 -30
- package/docs/crawl/core/components/ui/table/table.html +303 -171
- package/docs/crawl/core/components/ui/theme/theme.html +131 -0
- package/docs/crawl/core/components/ui/toast/toast.html +170 -59
- package/docs/crawl/core/components/ui/tooltip/tooltip.html +90 -29
- package/docs/crawl/docs/_decorators/ancestor-attribute.html +3 -2
- package/docs/crawl/docs/_getting-started/concorde-outside.html +3 -3
- package/docs/crawl/docs/_getting-started/start.html +1 -1
- package/docs/crawl/docs/_getting-started/theming.html +311 -63
- package/docs/crawl/hubs/form-components.html +75 -53
- package/docs/crawl/index.html +7 -6
- package/docs/docs-mock-api-sw.js +2 -0
- package/docs/docs-mock-api-sw.js.map +2 -2
- package/docs/index.html +9 -7
- package/docs/llms-full.txt +1703 -456
- package/docs/llms.txt +25 -32
- package/docs/sitemap.xml +3 -0
- package/docs/src/core/components/functional/fetch/fetch.md +0 -0
- package/docs/src/core/components/functional/if/if.md +0 -0
- package/docs/src/core/components/functional/list/list.md +0 -0
- package/docs/src/core/components/functional/router/router.md +0 -0
- package/docs/src/core/components/functional/sdui/sdui.md +0 -0
- package/docs/src/core/components/functional/states/states.md +0 -0
- package/docs/src/core/components/functional/submit/submit.md +0 -0
- package/docs/src/core/components/ui/alert/alert.md +147 -72
- package/docs/src/core/components/ui/alert-messages/alert-messages.md +85 -0
- package/docs/src/core/components/ui/badge/badge.md +141 -80
- package/docs/src/core/components/ui/button/button.md +1 -0
- package/docs/src/core/components/ui/captcha/captcha.md +65 -6
- package/docs/src/core/components/ui/card/card.md +183 -65
- package/docs/src/core/components/ui/divider/divider.md +107 -13
- package/docs/src/core/components/ui/form/fieldset/fieldset.md +175 -99
- package/docs/src/core/components/ui/form/form-actions/form-actions.md +75 -52
- package/docs/src/core/components/ui/form/form-layout/form-layout.md +109 -34
- package/docs/src/core/components/ui/form/input/input.md +1 -1
- package/docs/src/core/components/ui/form/radio/radio.md +0 -0
- package/docs/src/core/components/ui/form/select/select.md +0 -0
- package/docs/src/core/components/ui/form/switch/switch.md +0 -0
- package/docs/src/core/components/ui/form/textarea/textarea.md +1 -1
- package/docs/src/core/components/ui/group/group.md +36 -36
- package/docs/src/core/components/ui/icon/icon.md +132 -43
- package/docs/src/core/components/ui/image/image.md +179 -53
- package/docs/src/core/components/ui/link/link.md +45 -7
- package/docs/src/core/components/ui/loader/loader.md +79 -22
- package/docs/src/core/components/ui/menu/menu.md +133 -92
- package/docs/src/core/components/ui/modal/modal.md +163 -47
- package/docs/src/core/components/ui/pop/pop.md +262 -64
- package/docs/src/core/components/ui/progress/progress.md +76 -30
- package/docs/src/core/components/ui/table/table.md +147 -171
- package/docs/src/core/components/ui/theme/theme.md +122 -0
- package/docs/src/core/components/ui/toast/toast.md +108 -58
- package/docs/src/core/components/ui/tooltip/tooltip.md +68 -26
- package/docs/src/docs/_core-concept/subscriber.md +0 -0
- package/docs/src/docs/_decorators/ancestor-attribute.md +3 -2
- package/docs/src/docs/_getting-started/concorde-outside.md +3 -3
- package/docs/src/docs/_getting-started/my-first-subscriber.md +0 -0
- package/docs/src/docs/_getting-started/pubsub.md +0 -0
- package/docs/src/docs/_getting-started/start.md +1 -1
- package/docs/src/docs/_getting-started/theming.md +223 -61
- package/docs/src/docs/search/docs-search.json +3083 -348
- package/docs/src/tsconfig.json +63 -3
- package/gitlab/job_tests.sh +0 -0
- package/index.html +4 -2
- package/package.json +7 -1
- package/public/docs-mock-api-sw.js +2 -0
- package/public/docs-mock-api-sw.js.map +2 -2
- package/scripts/post-build-docs.js +0 -0
- package/scripts/post-build.mjs +0 -0
- package/src/core/components/functional/fetch/fetch.md +0 -0
- package/src/core/components/functional/if/if.md +0 -0
- package/src/core/components/functional/list/list.demo.ts +0 -0
- package/src/core/components/functional/list/list.md +0 -0
- package/src/core/components/functional/router/router.md +0 -0
- package/src/core/components/functional/router/router.ts +0 -0
- package/src/core/components/functional/sdui/sdui.md +0 -0
- package/src/core/components/functional/states/states.md +0 -0
- package/src/core/components/functional/submit/submit.md +0 -0
- package/src/core/components/functional/subscriber/subscriber.ts +0 -0
- package/src/core/components/ui/_css/align.ts +1 -0
- package/src/core/components/ui/_css/size.ts +0 -0
- package/src/core/components/ui/_css/type.ts +86 -8
- package/src/core/components/ui/_i18n/ui-aria-labels.ts +8 -0
- package/src/core/components/ui/alert/alert.md +21 -2
- package/src/core/components/ui/alert-messages/alert-messages.md +85 -0
- package/src/core/components/ui/badge/badge.md +19 -6
- package/src/core/components/ui/badge/badge.ts +8 -9
- package/src/core/components/ui/button/button.ts +5 -15
- package/src/core/components/ui/captcha/altchaStyles.ts +0 -0
- package/src/core/components/ui/captcha/captcha.md +65 -6
- package/src/core/components/ui/card/card.md +73 -10
- package/src/core/components/ui/card/card.ts +24 -22
- package/src/core/components/ui/divider/divider.md +107 -13
- package/src/core/components/ui/divider/divider.ts +40 -33
- package/src/core/components/ui/form/fieldset/fieldset.md +175 -99
- package/src/core/components/ui/form/fieldset/fieldset.ts +15 -28
- package/src/core/components/ui/form/fieldset/legend.ts +13 -13
- package/src/core/components/ui/form/form-actions/form-actions.md +75 -52
- package/src/core/components/ui/form/form-actions/form-actions.ts +7 -5
- package/src/core/components/ui/form/form-layout/form-layout.md +109 -34
- package/src/core/components/ui/form/form-layout/form-layout.ts +27 -24
- package/src/core/components/ui/form/radio/radio.md +0 -0
- package/src/core/components/ui/form/select/select.md +0 -0
- package/src/core/components/ui/form/switch/switch.md +0 -0
- package/src/core/components/ui/form/textarea/textarea.ts +4 -3
- package/src/core/components/ui/group/group.md +36 -36
- package/src/core/components/ui/group/group.ts +5 -10
- package/src/core/components/ui/icon/icon.md +132 -43
- package/src/core/components/ui/image/image.md +35 -3
- package/src/core/components/ui/link/link.md +43 -5
- package/src/core/components/ui/loader/loader.md +79 -22
- package/src/core/components/ui/loader/loader.ts +67 -27
- package/src/core/components/ui/loader/styles/fixed.ts +6 -11
- package/src/core/components/ui/menu/menu.md +133 -92
- package/src/core/components/ui/menu/menu.ts +53 -58
- package/src/core/components/ui/modal/modal.md +163 -47
- package/src/core/components/ui/modal/modal.ts +2 -4
- package/src/core/components/ui/pop/pop.md +217 -123
- package/src/core/components/ui/pop/pop.ts +0 -1
- package/src/core/components/ui/progress/progress.md +76 -30
- package/src/core/components/ui/progress/progress.ts +25 -56
- package/src/core/components/ui/table/table-caption.ts +2 -2
- package/src/core/components/ui/table/table-tbody.ts +3 -3
- package/src/core/components/ui/table/table-td.ts +23 -18
- package/src/core/components/ui/table/table-th.ts +8 -8
- package/src/core/components/ui/table/table-tr.ts +4 -4
- package/src/core/components/ui/table/table.md +147 -171
- package/src/core/components/ui/table/table.ts +20 -19
- package/src/core/components/ui/theme/theme-collection/auto.ts +15 -0
- package/src/core/components/ui/theme/theme-collection/core-variables.ts +8 -31
- package/src/core/components/ui/theme/theme-collection/dark.ts +1 -7
- package/src/core/components/ui/theme/theme-collection/light.ts +30 -26
- package/src/core/components/ui/theme/theme.md +122 -0
- package/src/core/components/ui/theme/theme.ts +30 -7
- package/src/core/components/ui/toast/toast-item.ts +6 -9
- package/src/core/components/ui/toast/toast.md +108 -58
- package/src/core/components/ui/toast/types.ts +1 -1
- package/src/core/components/ui/tooltip/tooltip.md +68 -26
- package/src/core/mixins/Subscriber.ts +0 -0
- package/src/core/utils/DataBindObserver.ts +0 -0
- package/src/core/utils/Objects.ts +0 -0
- package/src/core/utils/route.ts +0 -0
- package/src/docs/_core-concept/subscriber.md +0 -0
- package/src/docs/_getting-started/my-first-subscriber.md +0 -0
- package/src/docs/_getting-started/pubsub.md +0 -0
- package/src/docs/_getting-started/start.md +1 -1
- package/src/docs/_getting-started/theming.md +223 -61
- package/src/docs/code.ts +125 -58
- package/src/docs/example/users.ts +0 -0
- package/src/docs/header/header.ts +62 -54
- package/src/docs/mock-api/router.ts +2 -0
- package/src/docs/navigation/navigation.ts +6 -3
- package/src/docs/search/docs-search.json +2504 -399
- package/src/docs/search/markdown-renderer.ts +6 -6
- package/src/docs/search/page.ts +0 -0
- package/src/docs/search/search.ts +4 -4
- package/src/docs/tailwind/css/tailwind.css +6 -5
- package/src/tsconfig.json +18 -0
- package/src/tsconfig.tsbuildinfo +1 -1
- package/tailwind.config.js +19 -0
- package/.github/workflows/ci.yml +0 -21
- package/.github-export-ignore +0 -30
- package/CONTRIBUTING.md +0 -59
- package/DEV.md +0 -54
- package/LICENSE +0 -21
- package/OPEN_SOURCE_CHECKPOINT.md +0 -133
- package/docs/assets/index-DiD0qYvE.css +0 -1
- package/docs/src/tsconfig.declarations.json +0 -22
- package/docs/src/tsconfig.emit.json +0 -23
- package/gitlab/job_github_mirror.sh +0 -39
- package/scripts/github-export.mjs +0 -150
- package/src/css.d.ts +0 -19
- package/src/tsconfig.declarations.json +0 -22
- package/src/tsconfig.emit.json +0 -23
|
@@ -4,8 +4,8 @@
|
|
|
4
4
|
<meta charset="UTF-8">
|
|
5
5
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
6
6
|
<title>Icon — Concorde</title>
|
|
7
|
-
<meta name="description" content="
|
|
8
|
-
<meta name="keywords" content="Concorde, supersoniks, core/components/ui/icon/icon, icon, Icon, UI component, sonic-icon, web component">
|
|
7
|
+
<meta name="description" content="sonic-icon renders inline SVG icons from the bundled core set or from CDN libraries. Set name (and library / prefix when needed); scale with size. Icons inherit currentColor and are aria-hidden by def">
|
|
8
|
+
<meta name="keywords" content="Concorde, supersoniks, core/components/ui/icon/icon, icon, Icon, UI component, sonic-icon, web component, name, library, prefix, size, currentColor, aria-hidden, icons.json">
|
|
9
9
|
<meta name="concorde-doc-id" content="core/components/ui/icon/icon">
|
|
10
10
|
<link rel="canonical" href="https://concorde.supersoniks.org/crawl/core/components/ui/icon/icon.html">
|
|
11
11
|
</head>
|
|
@@ -15,117 +15,206 @@
|
|
|
15
15
|
</header>
|
|
16
16
|
<main>
|
|
17
17
|
<article>
|
|
18
|
-
<p class="doc-lead" id="doc-summary"><strong>Concorde UI component — Icon</strong>.
|
|
18
|
+
<p class="doc-lead" id="doc-summary"><strong>Concorde UI component — Icon</strong>. sonic-icon renders inline SVG icons from the bundled core set or from CDN libraries. Set name (and library / prefix when needed); scale with size. Icons inherit currentColor and are aria-hidden by def <span>Doc ID: <code>core/components/ui/icon/icon</code>. Keywords: Concorde, supersoniks, core/components/ui/icon/icon, icon, Icon, UI component, sonic-icon, web component, name, library, prefix, size, currentColor, aria-hidden, icons.json. URL: <a href="https://concorde.supersoniks.org/crawl/core/components/ui/icon/icon.html">https://concorde.supersoniks.org/crawl/core/components/ui/icon/icon.html</a>.</span></p>
|
|
19
19
|
<h1 id="icon">Icon</h1>
|
|
20
|
-
<
|
|
21
|
-
<
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
<div class="grid grid-cols-2 sm:grid-cols-3 lg:grid-cols-4 gap-8">
|
|
28
|
-
<div class="text-center">
|
|
29
|
-
<sonic-icon library="custom" prefix="regular" name="plane"></sonic-icon>
|
|
30
|
-
<br>
|
|
31
|
-
<div class="text-xs mt-1">regular</div>
|
|
32
|
-
</div>
|
|
33
|
-
<div class="text-center">
|
|
34
|
-
<sonic-icon library="custom" prefix="solid" name="plane"></sonic-icon>
|
|
35
|
-
<br>
|
|
36
|
-
<div class="text-xs mt-1">solid</div>
|
|
37
|
-
</div>
|
|
38
|
-
<div class="text-center">
|
|
39
|
-
<sonic-icon library="custom" name="plane"></sonic-icon>
|
|
40
|
-
<br>
|
|
41
|
-
<div class="text-xs mt-1">default prefix</div>
|
|
42
|
-
</div>
|
|
20
|
+
<p><strong><code>sonic-icon</code></strong> renders inline SVG icons from the <strong>bundled core set</strong> or from <strong>CDN libraries</strong>. Set <strong><code>name</code></strong> (and <strong><code>library</code></strong> / <strong><code>prefix</code></strong> when needed); scale with <strong><code>size</code></strong>. Icons inherit <strong><code>currentColor</code></strong> and are <strong><code>aria-hidden</code></strong> by default—keep visible text nearby or label the control that contains them.</p>
|
|
21
|
+
<h2 id="core-library">Core library</h2>
|
|
22
|
+
<p>Omit <strong><code>library</code></strong> to use the bundled set in <code>icons.json</code>. Available <strong><code>name</code></strong> values: <code>cancel</code> · <code>check</code> · <code>check-circled-outline</code> · <code>emoji-puzzled</code> · <code>info-empty</code> · <code>loader</code> · <code>minus-small</code> · <code>more-horiz</code> · <code>more-vert</code> · <code>nav-arrow-down</code> · <code>warning-circled-outline</code>.</p>
|
|
23
|
+
<pre><code><div class="grid grid-cols-2 sm:grid-cols-3 lg:grid-cols-4 gap-8">
|
|
24
|
+
<div class="text-center">
|
|
25
|
+
<sonic-icon name="cancel" size="lg"></sonic-icon>
|
|
26
|
+
<div class="text-xs mt-1">cancel</div>
|
|
43
27
|
</div>
|
|
44
|
-
|
|
28
|
+
<div class="text-center">
|
|
29
|
+
<sonic-icon name="check" size="lg"></sonic-icon>
|
|
30
|
+
<div class="text-xs mt-1">check</div>
|
|
31
|
+
</div>
|
|
32
|
+
<div class="text-center">
|
|
33
|
+
<sonic-icon name="check-circled-outline" size="lg"></sonic-icon>
|
|
34
|
+
<div class="text-xs mt-1">check-circled-outline</div>
|
|
35
|
+
</div>
|
|
36
|
+
<div class="text-center">
|
|
37
|
+
<sonic-icon name="emoji-puzzled" size="lg"></sonic-icon>
|
|
38
|
+
<div class="text-xs mt-1">emoji-puzzled</div>
|
|
39
|
+
</div>
|
|
40
|
+
<div class="text-center">
|
|
41
|
+
<sonic-icon name="info-empty" size="lg"></sonic-icon>
|
|
42
|
+
<div class="text-xs mt-1">info-empty</div>
|
|
43
|
+
</div>
|
|
44
|
+
<div class="text-center">
|
|
45
|
+
<sonic-icon name="loader" size="lg"></sonic-icon>
|
|
46
|
+
<div class="text-xs mt-1">loader</div>
|
|
47
|
+
</div>
|
|
48
|
+
<div class="text-center">
|
|
49
|
+
<sonic-icon name="minus-small" size="lg"></sonic-icon>
|
|
50
|
+
<div class="text-xs mt-1">minus-small</div>
|
|
51
|
+
</div>
|
|
52
|
+
<div class="text-center">
|
|
53
|
+
<sonic-icon name="more-horiz" size="lg"></sonic-icon>
|
|
54
|
+
<div class="text-xs mt-1">more-horiz</div>
|
|
55
|
+
</div>
|
|
56
|
+
<div class="text-center">
|
|
57
|
+
<sonic-icon name="more-vert" size="lg"></sonic-icon>
|
|
58
|
+
<div class="text-xs mt-1">more-vert</div>
|
|
59
|
+
</div>
|
|
60
|
+
<div class="text-center">
|
|
61
|
+
<sonic-icon name="nav-arrow-down" size="lg"></sonic-icon>
|
|
62
|
+
<div class="text-xs mt-1">nav-arrow-down</div>
|
|
63
|
+
</div>
|
|
64
|
+
<div class="text-center">
|
|
65
|
+
<sonic-icon name="warning-circled-outline" size="lg"></sonic-icon>
|
|
66
|
+
<div class="text-xs mt-1">warning-circled-outline</div>
|
|
67
|
+
</div>
|
|
68
|
+
</div>
|
|
45
69
|
</code></pre>
|
|
46
|
-
<h2 id="external">External</h2>
|
|
70
|
+
<h2 id="external-libraries">External libraries</h2>
|
|
71
|
+
<p>Set <strong><code>library</code></strong> to load SVGs from a built-in CDN template. <strong><code>prefix</code></strong> falls back to each library’s default when omitted (<code>outline</code> for <strong><code>heroicons</code></strong>, <strong><code>regular</code></strong> for <strong><code>fontAwesome</code></strong> and <strong><code>material</code></strong>, and so on).</p>
|
|
47
72
|
<pre><code><div class="grid grid-cols-2 sm:grid-cols-3 lg:grid-cols-4 gap-8">
|
|
48
73
|
<sonic-link href="https://heroicons.com/" target="_blank" class="text-center underline">
|
|
49
74
|
<sonic-icon library="heroicons" prefix="outline" name="academic-cap" size="lg"></sonic-icon>
|
|
50
|
-
<br
|
|
75
|
+
<br />
|
|
51
76
|
<div class="text-xs mt-1">heroicons</div>
|
|
52
77
|
</sonic-link>
|
|
53
78
|
<sonic-link href="https://iconoir.com/" target="_blank" class="text-center underline">
|
|
54
|
-
<sonic-icon library="iconoir" name="2x2-cell"
|
|
55
|
-
<br
|
|
79
|
+
<sonic-icon library="iconoir" name="2x2-cell" size="lg"></sonic-icon>
|
|
80
|
+
<br />
|
|
56
81
|
<div class="text-xs mt-1">iconoir</div>
|
|
57
82
|
</sonic-link>
|
|
58
83
|
<sonic-link href="https://materialdesignicons.com/" target="_blank" class="text-center underline">
|
|
59
84
|
<sonic-icon library="material" prefix="outline" name="email" size="lg"></sonic-icon>
|
|
60
|
-
<br
|
|
85
|
+
<br />
|
|
61
86
|
<div class="text-xs mt-1">material design</div>
|
|
62
87
|
</sonic-link>
|
|
63
88
|
<sonic-link href="https://fontawesome.com/search?o=r&m=free&s=regular" target="_blank" class="text-center underline">
|
|
64
89
|
<sonic-icon library="fontAwesome" prefix="regular" name="user" size="lg"></sonic-icon>
|
|
65
|
-
<br
|
|
90
|
+
<br />
|
|
66
91
|
<div class="text-xs mt-1">fontAwesome regular</div>
|
|
67
92
|
</sonic-link>
|
|
68
93
|
<sonic-link href="https://fontawesome.com/search?o=r&m=free&s=solid" target="_blank" class="text-center underline">
|
|
69
94
|
<sonic-icon library="fontAwesome" prefix="solid" name="book" size="lg"></sonic-icon>
|
|
70
|
-
<br
|
|
95
|
+
<br />
|
|
71
96
|
<div class="text-xs mt-1">fontAwesome solid</div>
|
|
72
97
|
</sonic-link>
|
|
73
98
|
<sonic-link href="https://feathericons.com/" target="_blank" class="text-center underline">
|
|
74
|
-
<sonic-icon library="feathers" name="activity"
|
|
75
|
-
<br
|
|
99
|
+
<sonic-icon library="feathers" name="activity" size="lg"></sonic-icon>
|
|
100
|
+
<br />
|
|
76
101
|
<div class="text-xs mt-1">feathers</div>
|
|
77
102
|
</sonic-link>
|
|
78
103
|
<sonic-link href="https://lucide.dev/" target="_blank" class="text-center underline">
|
|
79
|
-
<sonic-icon library="lucide" name="album"
|
|
80
|
-
<br
|
|
104
|
+
<sonic-icon library="lucide" name="album" size="lg"></sonic-icon>
|
|
105
|
+
<br />
|
|
81
106
|
<div class="text-xs mt-1">lucide</div>
|
|
82
107
|
</sonic-link>
|
|
83
108
|
</div>
|
|
84
109
|
</code></pre>
|
|
110
|
+
<h2 id="custom-library">Custom library</h2>
|
|
111
|
+
<p>Use <strong><code>library="custom"</code></strong> with SVG files on your origin. On an ancestor (for example <strong><code>sonic-scope</code></strong> or <strong><code>sonic-code</code></strong>), set <strong><code>customIconLibraryPath</code></strong> to a URL template with <strong><code>$prefix</code></strong> and <strong><code>$name</code></strong> placeholders, and optionally <strong><code>customIconDefaultPrefix</code></strong> when <strong><code>prefix</code></strong> is omitted.</p>
|
|
112
|
+
<pre><code><sonic-scope
|
|
113
|
+
customIconLibraryPath="/svg/$prefix/$name.svg"
|
|
114
|
+
customIconDefaultPrefix="regular"
|
|
115
|
+
>
|
|
116
|
+
<div class="grid grid-cols-2 sm:grid-cols-3 lg:grid-cols-4 gap-8">
|
|
117
|
+
<div class="text-center">
|
|
118
|
+
<sonic-icon library="custom" prefix="regular" name="plane"></sonic-icon>
|
|
119
|
+
<br />
|
|
120
|
+
<div class="text-xs mt-1">regular</div>
|
|
121
|
+
</div>
|
|
122
|
+
<div class="text-center">
|
|
123
|
+
<sonic-icon library="custom" prefix="solid" name="plane"></sonic-icon>
|
|
124
|
+
<br />
|
|
125
|
+
<div class="text-xs mt-1">solid</div>
|
|
126
|
+
</div>
|
|
127
|
+
<div class="text-center">
|
|
128
|
+
<sonic-icon library="custom" name="plane"></sonic-icon>
|
|
129
|
+
<br />
|
|
130
|
+
<div class="text-xs mt-1">default prefix</div>
|
|
131
|
+
</div>
|
|
132
|
+
</div>
|
|
133
|
+
</sonic-scope>
|
|
134
|
+
</code></pre>
|
|
85
135
|
<h2 id="size">Size</h2>
|
|
86
|
-
<
|
|
136
|
+
<p>Omit <strong><code>size</code></strong> for the default scale (<code>1em</code> height). Larger steps use <strong><code>3xl</code></strong>.</p>
|
|
137
|
+
<pre><code><div class="grid grid-cols-2 sm:grid-cols-3 lg:grid-cols-4 gap-8">
|
|
87
138
|
<div class="text-center">
|
|
88
139
|
<sonic-icon library="heroicons" prefix="outline" name="academic-cap" size="2xs"></sonic-icon>
|
|
89
|
-
<br
|
|
140
|
+
<br />
|
|
90
141
|
<div class="text-xs mt-1">2xs</div>
|
|
91
142
|
</div>
|
|
92
143
|
<div class="text-center">
|
|
93
144
|
<sonic-icon library="heroicons" prefix="outline" name="academic-cap" size="xs"></sonic-icon>
|
|
94
|
-
<br
|
|
145
|
+
<br />
|
|
95
146
|
<div class="text-xs mt-1">xs</div>
|
|
96
147
|
</div>
|
|
97
148
|
<div class="text-center">
|
|
98
149
|
<sonic-icon library="heroicons" prefix="outline" name="academic-cap" size="sm"></sonic-icon>
|
|
99
|
-
<br
|
|
150
|
+
<br />
|
|
100
151
|
<div class="text-xs mt-1">sm</div>
|
|
101
152
|
</div>
|
|
102
153
|
<div class="text-center">
|
|
103
154
|
<sonic-icon library="heroicons" prefix="outline" name="academic-cap"></sonic-icon>
|
|
104
|
-
<br
|
|
155
|
+
<br />
|
|
105
156
|
<div class="text-xs mt-1">default</div>
|
|
106
157
|
</div>
|
|
107
158
|
<div class="text-center">
|
|
108
159
|
<sonic-icon library="heroicons" prefix="outline" name="academic-cap" size="lg"></sonic-icon>
|
|
109
|
-
<br
|
|
160
|
+
<br />
|
|
110
161
|
<div class="text-xs mt-1">lg</div>
|
|
111
162
|
</div>
|
|
112
163
|
<div class="text-center">
|
|
113
164
|
<sonic-icon library="heroicons" prefix="outline" name="academic-cap" size="xl"></sonic-icon>
|
|
114
|
-
<br
|
|
165
|
+
<br />
|
|
115
166
|
<div class="text-xs mt-1">xl</div>
|
|
116
167
|
</div>
|
|
117
168
|
<div class="text-center">
|
|
118
169
|
<sonic-icon library="heroicons" prefix="outline" name="academic-cap" size="2xl"></sonic-icon>
|
|
119
|
-
<br
|
|
170
|
+
<br />
|
|
120
171
|
<div class="text-xs mt-1">2xl</div>
|
|
121
172
|
</div>
|
|
122
173
|
<div class="text-center">
|
|
123
174
|
<sonic-icon library="heroicons" prefix="outline" name="academic-cap" size="3xl"></sonic-icon>
|
|
124
|
-
<br
|
|
175
|
+
<br />
|
|
125
176
|
<div class="text-xs mt-1">3xl</div>
|
|
126
177
|
</div>
|
|
127
178
|
</div>
|
|
128
179
|
</code></pre>
|
|
180
|
+
<h2 id="accessibility">Accessibility</h2>
|
|
181
|
+
<p>On connect, the host sets <strong><code>aria-hidden="true"</code></strong>. Treat icons as decorative unless the surrounding control already has an accessible name. Do not rely on <strong><code>sonic-icon</code></strong> alone for meaning—use visible text or <strong><code>aria-label</code></strong> on the parent button / link.</p>
|
|
182
|
+
<pre><code><sonic-button type="neutral" variant="outline" shape="circle" aria-label="User profile">
|
|
183
|
+
<sonic-icon library="iconoir" name="user"></sonic-icon>
|
|
184
|
+
</sonic-button>
|
|
185
|
+
</code></pre>
|
|
186
|
+
<h2 id="api-reference">API reference</h2>
|
|
187
|
+
<table>
|
|
188
|
+
<thead>
|
|
189
|
+
<tr>
|
|
190
|
+
<th>Attribute</th>
|
|
191
|
+
<th>Values</th>
|
|
192
|
+
<th>Description</th>
|
|
193
|
+
</tr>
|
|
194
|
+
</thead>
|
|
195
|
+
<tbody><tr>
|
|
196
|
+
<td><code>name</code></td>
|
|
197
|
+
<td>string</td>
|
|
198
|
+
<td>Icon id in the core bundle or in the remote library</td>
|
|
199
|
+
</tr>
|
|
200
|
+
<tr>
|
|
201
|
+
<td><code>library</code></td>
|
|
202
|
+
<td><code>heroicons</code> · <code>iconoir</code> · <code>feathers</code> · <code>lucide</code> · <code>material</code> · <code>fontAwesome</code> · <code>custom</code></td>
|
|
203
|
+
<td>CDN or custom template; omit for bundled core icons</td>
|
|
204
|
+
</tr>
|
|
205
|
+
<tr>
|
|
206
|
+
<td><code>prefix</code></td>
|
|
207
|
+
<td>string</td>
|
|
208
|
+
<td>Library-specific variant; defaults per library when empty</td>
|
|
209
|
+
</tr>
|
|
210
|
+
<tr>
|
|
211
|
+
<td><code>size</code></td>
|
|
212
|
+
<td><code>2xs</code> · <code>xs</code> · <code>sm</code> · <code>lg</code> · <code>xl</code> · <code>2xl</code> · <code>3xl</code> (default <code>md</code>)</td>
|
|
213
|
+
<td><code>em</code>-based SVG scale on the host</td>
|
|
214
|
+
</tr>
|
|
215
|
+
</tbody></table>
|
|
216
|
+
<p>Ancestor attributes (for <strong><code>library="custom"</code></strong> only): <strong><code>customIconLibraryPath</code></strong> (URL template with <strong><code>$prefix</code></strong> and <strong><code>$name</code></strong>) and <strong><code>customIconDefaultPrefix</code></strong>. May be set on <strong><code>sonic-scope</code></strong>, theme roots, or globally in the document.</p>
|
|
217
|
+
<p>No slots — the component inlines fetched or bundled SVG markup.</p>
|
|
129
218
|
|
|
130
219
|
</article>
|
|
131
220
|
</main>
|
|
@@ -4,8 +4,8 @@
|
|
|
4
4
|
<meta charset="UTF-8">
|
|
5
5
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
6
6
|
<title>Image — Concorde</title>
|
|
7
|
-
<meta name="description" content="
|
|
8
|
-
<meta name="keywords" content="Concorde, supersoniks, core/components/ui/image/image, image, Image, UI component, sonic-image, web component">
|
|
7
|
+
<meta name="description" content="sonic-image wraps a responsive <img> with aspect ratio, object-fit: cover, optional rounded corners, and load transitions. The host shows a placeholder background (--sc-placeholder-bg) until the asset">
|
|
8
|
+
<meta name="keywords" content="Concorde, supersoniks, core/components/ui/image/image, image, Image, UI component, sonic-image, web component, , object-fit: cover, --sc-placeholder-bg, loading, lazy, loading="eager", rounded, --sc-rounded">
|
|
9
9
|
<meta name="concorde-doc-id" content="core/components/ui/image/image">
|
|
10
10
|
<link rel="canonical" href="https://concorde.supersoniks.org/crawl/core/components/ui/image/image.html">
|
|
11
11
|
</head>
|
|
@@ -15,94 +15,282 @@
|
|
|
15
15
|
</header>
|
|
16
16
|
<main>
|
|
17
17
|
<article>
|
|
18
|
-
<p class="doc-lead" id="doc-summary"><strong>Concorde UI component — Image</strong>.
|
|
18
|
+
<p class="doc-lead" id="doc-summary"><strong>Concorde UI component — Image</strong>. sonic-image wraps a responsive <img> with aspect ratio, object-fit: cover, optional rounded corners, and load transitions. The host shows a placeholder background (--sc-placeholder-bg) until the asset <span>Doc ID: <code>core/components/ui/image/image</code>. Keywords: Concorde, supersoniks, core/components/ui/image/image, image, Image, UI component, sonic-image, web component, , object-fit: cover, --sc-placeholder-bg, loading, lazy, loading="eager", rounded, --sc-rounded. URL: <a href="https://concorde.supersoniks.org/crawl/core/components/ui/image/image.html">https://concorde.supersoniks.org/crawl/core/components/ui/image/image.html</a>.</span></p>
|
|
19
19
|
<h1 id="image">Image</h1>
|
|
20
|
+
<p><strong><code>sonic-image</code></strong> wraps a responsive <strong><code><img></code></strong> with aspect ratio, <code>object-fit: cover</code>, optional rounded corners, and load transitions. The host shows a placeholder background (<code>--sc-placeholder-bg</code>) until the asset loads. Default <strong><code>loading</code></strong> is <code>lazy</code>; use <strong><code>loading="eager"</code></strong> for above-the-fold heroes.</p>
|
|
20
21
|
<h2 id="rounded">Rounded</h2>
|
|
21
|
-
<
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
>
|
|
38
|
-
<
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
<
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
22
|
+
<p>Omit <code>rounded</code> for square corners. Boolean <strong><code>rounded</code></strong> uses the theme token <code>--sc-rounded</code>. Sizes: <strong><code>sm</code></strong>, <strong><code>md</code></strong>, <strong><code>lg</code></strong>, <strong><code>xl</code></strong>, <strong><code>full</code></strong> (circle — pair with <code>ratio="1/1"</code>), <strong><code>none</code></strong> (explicit reset).</p>
|
|
23
|
+
<pre><code><div class="grid gap-6 grid-cols-3 lg:grid-cols-4 items-end text-center text-xs ">
|
|
24
|
+
<div>
|
|
25
|
+
<sonic-image
|
|
26
|
+
ratio="1/1"
|
|
27
|
+
src="https://thegoodlife.fr/wp-content/uploads/sites/2/2022/03/compagnies-aeriennes-nostalgie-coeur-insert-03-dr.jpg"
|
|
28
|
+
></sonic-image>
|
|
29
|
+
<p class="mt-2">default</p>
|
|
30
|
+
</div>
|
|
31
|
+
<div>
|
|
32
|
+
<sonic-image
|
|
33
|
+
rounded="sm"
|
|
34
|
+
ratio="1/1"
|
|
35
|
+
src="https://thegoodlife.fr/wp-content/uploads/sites/2/2022/03/compagnies-aeriennes-nostalgie-coeur-insert-03-dr.jpg"
|
|
36
|
+
></sonic-image>
|
|
37
|
+
<p class="mt-2">sm</p>
|
|
38
|
+
</div>
|
|
39
|
+
<div>
|
|
40
|
+
<sonic-image
|
|
41
|
+
rounded
|
|
42
|
+
ratio="1/1"
|
|
43
|
+
src="https://thegoodlife.fr/wp-content/uploads/sites/2/2022/03/compagnies-aeriennes-nostalgie-coeur-insert-03-dr.jpg"
|
|
44
|
+
></sonic-image>
|
|
45
|
+
<p class="mt-2">rounded</p>
|
|
46
|
+
</div>
|
|
47
|
+
<div>
|
|
48
|
+
<sonic-image
|
|
49
|
+
rounded="md"
|
|
50
|
+
ratio="1/1"
|
|
51
|
+
src="https://thegoodlife.fr/wp-content/uploads/sites/2/2022/03/compagnies-aeriennes-nostalgie-coeur-insert-03-dr.jpg"
|
|
52
|
+
></sonic-image>
|
|
53
|
+
<p class="mt-2">md</p>
|
|
54
|
+
</div>
|
|
55
|
+
<div>
|
|
56
|
+
<sonic-image
|
|
57
|
+
rounded="lg"
|
|
58
|
+
ratio="1/1"
|
|
59
|
+
src="https://thegoodlife.fr/wp-content/uploads/sites/2/2022/03/compagnies-aeriennes-nostalgie-coeur-insert-03-dr.jpg"
|
|
60
|
+
></sonic-image>
|
|
61
|
+
<p class="mt-2">lg</p>
|
|
62
|
+
</div>
|
|
63
|
+
<div>
|
|
64
|
+
<sonic-image
|
|
65
|
+
rounded="xl"
|
|
66
|
+
ratio="1/1"
|
|
67
|
+
src="https://thegoodlife.fr/wp-content/uploads/sites/2/2022/03/compagnies-aeriennes-nostalgie-coeur-insert-03-dr.jpg"
|
|
68
|
+
></sonic-image>
|
|
69
|
+
<p class="mt-2">xl</p>
|
|
70
|
+
</div>
|
|
71
|
+
<div >
|
|
72
|
+
<div >
|
|
73
|
+
<sonic-image
|
|
74
|
+
rounded="full"
|
|
75
|
+
ratio="1/1"
|
|
76
|
+
src="https://thegoodlife.fr/wp-content/uploads/sites/2/2022/03/compagnies-aeriennes-nostalgie-coeur-insert-03-dr.jpg"
|
|
77
|
+
></sonic-image>
|
|
78
|
+
<p class="mt-2">full</p>
|
|
79
|
+
</div>
|
|
80
|
+
</div>
|
|
57
81
|
</div>
|
|
58
82
|
</code></pre>
|
|
59
|
-
<h2 id="ratio">
|
|
83
|
+
<h2 id="aspect-ratio">Aspect ratio</h2>
|
|
84
|
+
<p><strong><code>ratio</code></strong> sets CSS <code>aspect-ratio</code> on the image (default <strong><code>auto</code></strong>). The image still fills the host width (<code>width: 100%</code>).</p>
|
|
60
85
|
<pre><code><div class="grid gap-8 grid-cols-2 items-center">
|
|
61
86
|
<sonic-image
|
|
62
87
|
src="https://thegoodlife.fr/wp-content/uploads/sites/2/2022/03/compagnies-aeriennes-nostalgie-coeur-insert-03-dr.jpg"
|
|
63
|
-
>
|
|
64
|
-
</sonic-image>
|
|
88
|
+
></sonic-image>
|
|
65
89
|
<sonic-image
|
|
66
90
|
ratio="16/9"
|
|
67
91
|
src="https://thegoodlife.fr/wp-content/uploads/sites/2/2022/03/compagnies-aeriennes-nostalgie-coeur-insert-03-dr.jpg"
|
|
68
|
-
>
|
|
69
|
-
</sonic-image>
|
|
92
|
+
></sonic-image>
|
|
70
93
|
<sonic-image
|
|
71
94
|
ratio="1/1"
|
|
72
95
|
src="https://thegoodlife.fr/wp-content/uploads/sites/2/2022/03/compagnies-aeriennes-nostalgie-coeur-insert-03-dr.jpg"
|
|
73
|
-
>
|
|
74
|
-
</sonic-image>
|
|
96
|
+
></sonic-image>
|
|
75
97
|
<sonic-image
|
|
76
98
|
ratio="2/3"
|
|
77
99
|
src="https://thegoodlife.fr/wp-content/uploads/sites/2/2022/03/compagnies-aeriennes-nostalgie-coeur-insert-03-dr.jpg"
|
|
78
|
-
>
|
|
79
|
-
</sonic-image>
|
|
100
|
+
></sonic-image>
|
|
80
101
|
</div>
|
|
81
102
|
</code></pre>
|
|
82
103
|
<h2 id="object-position">Object position</h2>
|
|
104
|
+
<p><strong><code>objectPosition</code></strong> maps to CSS <code>object-position</code> (default <strong><code>center center</code></strong>). Useful on wide crops when the subject sits off-center.</p>
|
|
83
105
|
<pre><code><div class="grid gap-8 grid-cols-2 items-center">
|
|
84
106
|
<sonic-image
|
|
85
|
-
src="https://thegoodlife.fr/wp-content/uploads/sites/2/2022/03/compagnies-aeriennes-nostalgie-coeur-insert-03-dr.jpg"
|
|
86
107
|
ratio="11/4"
|
|
87
|
-
|
|
88
|
-
</sonic-image>
|
|
108
|
+
src="https://thegoodlife.fr/wp-content/uploads/sites/2/2022/03/compagnies-aeriennes-nostalgie-coeur-insert-03-dr.jpg"
|
|
109
|
+
></sonic-image>
|
|
89
110
|
<sonic-image
|
|
90
111
|
objectPosition="center top"
|
|
91
|
-
src="https://thegoodlife.fr/wp-content/uploads/sites/2/2022/03/compagnies-aeriennes-nostalgie-coeur-insert-03-dr.jpg"
|
|
92
112
|
ratio="11/4"
|
|
93
|
-
|
|
94
|
-
</sonic-image>
|
|
113
|
+
src="https://thegoodlife.fr/wp-content/uploads/sites/2/2022/03/compagnies-aeriennes-nostalgie-coeur-insert-03-dr.jpg"
|
|
114
|
+
></sonic-image>
|
|
95
115
|
</div>
|
|
96
116
|
</code></pre>
|
|
97
117
|
<h2 id="cover">Cover</h2>
|
|
98
|
-
<
|
|
118
|
+
<p><strong><code>cover</code></strong> stretches the image to fill a <strong>positioned</strong> parent (<code>position: relative</code> + fixed height or inset). Aspect ratio on the host is ignored while <code>cover</code> is set.</p>
|
|
119
|
+
<pre><code><div class="h-96 relative rounded-lg overflow-hidden">
|
|
99
120
|
<sonic-image
|
|
100
121
|
cover
|
|
101
122
|
src="https://thegoodlife.fr/wp-content/uploads/sites/2/2022/03/compagnies-aeriennes-nostalgie-coeur-insert-03-dr.jpg"
|
|
123
|
+
></sonic-image>
|
|
124
|
+
</div>
|
|
125
|
+
</code></pre>
|
|
126
|
+
<h2 id="load-transition">Load transition</h2>
|
|
127
|
+
<p>Set <strong><code>transition</code></strong> to <strong><code>fade</code></strong> (default when the attribute is present) or <strong><code>fade-scale-out</code></strong>. The image stays at <code>opacity: 0</code> until the browser fires <strong><code>load</code></strong>, then the <strong><code>loaded</code></strong> class runs the animation. Changing <code>src</code> on an existing element does not replay the effect — mount a new <code>sonic-image</code> when you need another entrance (galleries, infinite scroll).</p>
|
|
128
|
+
<p>Click <strong>Add image</strong> to append small thumbnails and replay the transition. <strong>Clear</strong> resets the row.</p>
|
|
129
|
+
<pre><code><div class="flex flex-wrap gap-2 mb-4">
|
|
130
|
+
<sonic-button
|
|
131
|
+
size="sm"
|
|
132
|
+
onclick="(function () {
|
|
133
|
+
var host = document.getElementById('sonic-image-transition-host');
|
|
134
|
+
var img = document.createElement('sonic-image');
|
|
135
|
+
img.transition = 'fade';
|
|
136
|
+
img.ratio = '1/1';
|
|
137
|
+
img.rounded = 'md';
|
|
138
|
+
img.loading = 'eager';
|
|
139
|
+
img.style.width = '8rem';
|
|
140
|
+
img.src = 'https://picsum.photos/seed/' + Date.now() + '/120/120';
|
|
141
|
+
host.appendChild(img);
|
|
142
|
+
})()"
|
|
143
|
+
>
|
|
144
|
+
Add image (fade)
|
|
145
|
+
</sonic-button>
|
|
146
|
+
<sonic-button
|
|
147
|
+
size="sm"
|
|
148
|
+
variant="outline"
|
|
149
|
+
onclick="(function () {
|
|
150
|
+
var host = document.getElementById('sonic-image-transition-host');
|
|
151
|
+
var img = document.createElement('sonic-image');
|
|
152
|
+
img.transition = 'fade-scale-out';
|
|
153
|
+
img.ratio = '1/1';
|
|
154
|
+
img.rounded = 'md';
|
|
155
|
+
img.loading = 'eager';
|
|
156
|
+
img.style.width = '8rem';
|
|
157
|
+
img.src = 'https://picsum.photos/seed/' + Date.now() + '/120/120';
|
|
158
|
+
host.appendChild(img);
|
|
159
|
+
})()"
|
|
102
160
|
>
|
|
103
|
-
|
|
161
|
+
Add image (fade-scale-out)
|
|
162
|
+
</sonic-button>
|
|
163
|
+
<sonic-button
|
|
164
|
+
size="sm"
|
|
165
|
+
variant="ghost"
|
|
166
|
+
onclick="document.getElementById('sonic-image-transition-host').replaceChildren()"
|
|
167
|
+
>
|
|
168
|
+
Clear
|
|
169
|
+
</sonic-button>
|
|
104
170
|
</div>
|
|
171
|
+
<div id="sonic-image-transition-host" class="flex flex-wrap gap-2 min-h-[5rem]"></div>
|
|
172
|
+
</code></pre>
|
|
173
|
+
<h2 id="accessibility-and-parts">Accessibility and parts</h2>
|
|
174
|
+
<p>Always set meaningful <strong><code>alt</code></strong> text (empty string only for decorative images). </p>
|
|
175
|
+
<pre><code><sonic-image
|
|
176
|
+
rounded="md"
|
|
177
|
+
ratio="16/9"
|
|
178
|
+
alt="Concorde aircraft in flight"
|
|
179
|
+
src="https://thegoodlife.fr/wp-content/uploads/sites/2/2022/03/compagnies-aeriennes-nostalgie-coeur-insert-03-dr.jpg"
|
|
180
|
+
></sonic-image>
|
|
105
181
|
</code></pre>
|
|
182
|
+
<h2 id="api-reference">API reference</h2>
|
|
183
|
+
<table>
|
|
184
|
+
<thead>
|
|
185
|
+
<tr>
|
|
186
|
+
<th>Attribute</th>
|
|
187
|
+
<th>Values</th>
|
|
188
|
+
<th>Description</th>
|
|
189
|
+
</tr>
|
|
190
|
+
</thead>
|
|
191
|
+
<tbody><tr>
|
|
192
|
+
<td><code>src</code></td>
|
|
193
|
+
<td>URL</td>
|
|
194
|
+
<td>Image URL passed to <code><img src></code></td>
|
|
195
|
+
</tr>
|
|
196
|
+
<tr>
|
|
197
|
+
<td><code>alt</code></td>
|
|
198
|
+
<td>string</td>
|
|
199
|
+
<td>Accessible description; use <code>""</code> only for decorative images</td>
|
|
200
|
+
</tr>
|
|
201
|
+
<tr>
|
|
202
|
+
<td><code>loading</code></td>
|
|
203
|
+
<td><code>lazy</code> (default), <code>eager</code></td>
|
|
204
|
+
<td>Native lazy loading</td>
|
|
205
|
+
</tr>
|
|
206
|
+
<tr>
|
|
207
|
+
<td><code>ratio</code></td>
|
|
208
|
+
<td>CSS ratio, <code>auto</code> (default)</td>
|
|
209
|
+
<td>Host <code>aspect-ratio</code> on the image (ignored when <code>cover</code> is set)</td>
|
|
210
|
+
</tr>
|
|
211
|
+
<tr>
|
|
212
|
+
<td><code>rounded</code></td>
|
|
213
|
+
<td><code>none</code> (default), boolean, <code>base</code>, <code>sm</code>, <code>md</code>, <code>lg</code>, <code>xl</code>, <code>full</code></td>
|
|
214
|
+
<td>Corner radius from theme tokens; <code>full</code> is a circle (often with <code>ratio="1/1"</code>)</td>
|
|
215
|
+
</tr>
|
|
216
|
+
<tr>
|
|
217
|
+
<td><code>objectPosition</code></td>
|
|
218
|
+
<td>CSS position</td>
|
|
219
|
+
<td>Maps to <code>object-position</code> (default <code>center center</code>)</td>
|
|
220
|
+
</tr>
|
|
221
|
+
<tr>
|
|
222
|
+
<td><code>imageRendering</code></td>
|
|
223
|
+
<td>CSS value</td>
|
|
224
|
+
<td>Maps to <code>image-rendering</code> (default <code>auto</code>)</td>
|
|
225
|
+
</tr>
|
|
226
|
+
<tr>
|
|
227
|
+
<td><code>cover</code></td>
|
|
228
|
+
<td>boolean</td>
|
|
229
|
+
<td>Absolutely fills a positioned parent; host aspect ratio is ignored</td>
|
|
230
|
+
</tr>
|
|
231
|
+
<tr>
|
|
232
|
+
<td><code>transition</code></td>
|
|
233
|
+
<td><code>fade</code>, <code>fade-scale-out</code></td>
|
|
234
|
+
<td>Opacity (and scale) animation after <code>load</code>; remount to replay on <code>src</code> change</td>
|
|
235
|
+
</tr>
|
|
236
|
+
</tbody></table>
|
|
237
|
+
<p>No slots — content is driven entirely by attributes on the inner <code><img></code>.</p>
|
|
238
|
+
<h2 id="api-reference-1">API reference</h2>
|
|
239
|
+
<table>
|
|
240
|
+
<thead>
|
|
241
|
+
<tr>
|
|
242
|
+
<th>Attribute</th>
|
|
243
|
+
<th>Values</th>
|
|
244
|
+
<th>Description</th>
|
|
245
|
+
</tr>
|
|
246
|
+
</thead>
|
|
247
|
+
<tbody><tr>
|
|
248
|
+
<td><code>src</code></td>
|
|
249
|
+
<td>URL</td>
|
|
250
|
+
<td>Image URL passed to <code><img src></code></td>
|
|
251
|
+
</tr>
|
|
252
|
+
<tr>
|
|
253
|
+
<td><code>alt</code></td>
|
|
254
|
+
<td>string</td>
|
|
255
|
+
<td>Accessible description; use <code>""</code> only for decorative images</td>
|
|
256
|
+
</tr>
|
|
257
|
+
<tr>
|
|
258
|
+
<td><code>loading</code></td>
|
|
259
|
+
<td><code>lazy</code> (default), <code>eager</code></td>
|
|
260
|
+
<td>Native lazy loading</td>
|
|
261
|
+
</tr>
|
|
262
|
+
<tr>
|
|
263
|
+
<td><code>ratio</code></td>
|
|
264
|
+
<td>CSS ratio, <code>auto</code> (default)</td>
|
|
265
|
+
<td>Host <code>aspect-ratio</code> on the image (ignored when <code>cover</code> is set)</td>
|
|
266
|
+
</tr>
|
|
267
|
+
<tr>
|
|
268
|
+
<td><code>rounded</code></td>
|
|
269
|
+
<td><code>none</code> (default), boolean, <code>base</code>, <code>sm</code>, <code>md</code>, <code>lg</code>, <code>xl</code>, <code>full</code></td>
|
|
270
|
+
<td>Corner radius from theme tokens; <code>full</code> is a circle (often with <code>ratio="1/1"</code>)</td>
|
|
271
|
+
</tr>
|
|
272
|
+
<tr>
|
|
273
|
+
<td><code>objectPosition</code></td>
|
|
274
|
+
<td>CSS position</td>
|
|
275
|
+
<td>Maps to <code>object-position</code> (default <code>center center</code>)</td>
|
|
276
|
+
</tr>
|
|
277
|
+
<tr>
|
|
278
|
+
<td><code>imageRendering</code></td>
|
|
279
|
+
<td>CSS value</td>
|
|
280
|
+
<td>Maps to <code>image-rendering</code> (default <code>auto</code>)</td>
|
|
281
|
+
</tr>
|
|
282
|
+
<tr>
|
|
283
|
+
<td><code>cover</code></td>
|
|
284
|
+
<td>boolean</td>
|
|
285
|
+
<td>Absolutely fills a positioned parent; host aspect ratio is ignored</td>
|
|
286
|
+
</tr>
|
|
287
|
+
<tr>
|
|
288
|
+
<td><code>transition</code></td>
|
|
289
|
+
<td><code>fade</code>, <code>fade-scale-out</code></td>
|
|
290
|
+
<td>Opacity (and scale) animation after <code>load</code>; remount to replay on <code>src</code> change</td>
|
|
291
|
+
</tr>
|
|
292
|
+
</tbody></table>
|
|
293
|
+
<p>No slots — content is driven entirely by attributes on the inner <code><img></code>.</p>
|
|
106
294
|
|
|
107
295
|
</article>
|
|
108
296
|
</main>
|