diff --git a/2nd-gen/packages/core/components/asset/Asset.base.ts b/2nd-gen/packages/core/components/asset/Asset.base.ts
index de8d51a9bb7..f152e05fa57 100644
--- a/2nd-gen/packages/core/components/asset/Asset.base.ts
+++ b/2nd-gen/packages/core/components/asset/Asset.base.ts
@@ -10,14 +10,64 @@
* governing permissions and limitations under the License.
*/
+import { PropertyValues } from 'lit';
import { property } from 'lit/decorators.js';
import { SpectrumElement } from '@spectrum-web-components/core/shared/base/index.js';
+import { ASSET_VARIANTS, type AssetVariant } from './Asset.types.js';
+
export abstract class AssetBase extends SpectrumElement {
+ // ─────────────────────────
+ // API TO OVERRIDE
+ // ─────────────────────────
+
+ /**
+ * @internal
+ *
+ * A readonly array of all valid variants for the asset.
+ *
+ * This is an actual internal property, intended not for customer use
+ */
+ static readonly VARIANTS: readonly AssetVariant[] = ASSET_VARIANTS;
+
+ // ─────────────────
+ // SHARED API
+ // ─────────────────
+
+ /**
+ * The variant of the asset. When not provided, slot content is rendered (e.g., an image).
+ */
@property({ type: String, reflect: true })
- public variant: 'file' | 'folder' | undefined;
+ public variant: AssetVariant | undefined;
+ /**
+ * Accessible label for the asset’s file or folder variant.
+ */
@property()
public label = '';
+
+ // ──────────────────────
+ // IMPLEMENTATION
+ // ──────────────────────
+
+ protected override updated(changes: PropertyValues): void {
+ super.updated(changes);
+ if (window.__swc?.DEBUG) {
+ const constructor = this.constructor as typeof AssetBase;
+ if (
+ typeof this.variant !== 'undefined' &&
+ !constructor.VARIANTS.includes(this.variant)
+ ) {
+ window.__swc.warn(
+ this,
+ `<${this.localName}> element expects the "variant" attribute to be one of the following:`,
+ 'https://opensource.adobe.com/spectrum-web-components/components/asset/',
+ {
+ issues: [...constructor.VARIANTS],
+ }
+ );
+ }
+ }
+ }
}
diff --git a/2nd-gen/packages/core/components/asset/Asset.types.ts b/2nd-gen/packages/core/components/asset/Asset.types.ts
new file mode 100644
index 00000000000..a0609d4a4f8
--- /dev/null
+++ b/2nd-gen/packages/core/components/asset/Asset.types.ts
@@ -0,0 +1,15 @@
+/**
+ * Copyright 2025 Adobe. All rights reserved.
+ * This file is licensed to you under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License. You may obtain a copy
+ * of the License at http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software distributed under
+ * the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
+ * OF ANY KIND, either express or implied. See the License for the specific language
+ * governing permissions and limitations under the License.
+ */
+
+export const ASSET_VARIANTS = ['file', 'folder'] as const;
+
+export type AssetVariant = (typeof ASSET_VARIANTS)[number];
diff --git a/2nd-gen/packages/core/components/asset/index.ts b/2nd-gen/packages/core/components/asset/index.ts
index 6e056c33d49..abc233ce7a3 100644
--- a/2nd-gen/packages/core/components/asset/index.ts
+++ b/2nd-gen/packages/core/components/asset/index.ts
@@ -10,3 +10,4 @@
* governing permissions and limitations under the License.
*/
export * from './Asset.base.js';
+export * from './Asset.types.js';
diff --git a/2nd-gen/packages/swc/components/asset/Asset.ts b/2nd-gen/packages/swc/components/asset/Asset.ts
index 8115e7c992c..0e46c78355b 100644
--- a/2nd-gen/packages/swc/components/asset/Asset.ts
+++ b/2nd-gen/packages/swc/components/asset/Asset.ts
@@ -11,6 +11,7 @@
*/
import { CSSResultArray, html, TemplateResult } from 'lit';
+import { classMap } from 'lit/directives/class-map.js';
import { AssetBase } from '@spectrum-web-components/core/components/asset';
@@ -18,17 +19,17 @@ import styles from './asset.css';
const file = (label: string): TemplateResult => html`
@@ -36,17 +37,17 @@ const file = (label: string): TemplateResult => html`
const folder = (label: string): TemplateResult => html`
@@ -54,19 +55,41 @@ const folder = (label: string): TemplateResult => html`
/**
* @element swc-asset
- * @slot - content to be displayed in the asset when an acceptable value for `file` is not present
+ * @slot - content to be displayed when no `variant` is set (typically an `` element)
+ *
+ * @example
+ *
+ *
+ *
+ *
+ * @example
+ *
+ *
+ * @example
+ *
*/
export class Asset extends AssetBase {
+ // ──────────────────────────────
+ // RENDERING & STYLING
+ // ──────────────────────────────
+
public static override get styles(): CSSResultArray {
return [styles];
}
protected override render(): TemplateResult {
- if (this.variant === 'file') {
- return file(this.label);
- } else if (this.variant === 'folder') {
- return folder(this.label);
- }
- return html` `;
+ return html`
+