diff --git a/.changeset/thirty-starfishes-shout.md b/.changeset/thirty-starfishes-shout.md
new file mode 100644
index 0000000000..3c577dcee1
--- /dev/null
+++ b/.changeset/thirty-starfishes-shout.md
@@ -0,0 +1,5 @@
+---
+'svelte': minor
+---
+
+feat: Expose `ClassValue` from `svelte/elements`
diff --git a/documentation/docs/03-template-syntax/18-class.md b/documentation/docs/03-template-syntax/18-class.md
index 880a34e9ec..1ea4a208df 100644
--- a/documentation/docs/03-template-syntax/18-class.md
+++ b/documentation/docs/03-template-syntax/18-class.md
@@ -71,6 +71,18 @@ The user of this component has the same flexibility to use a mixture of objects,
```
+Svelte also exposes the `ClassValue` type, which is the type of value that the `class` attribute on elements accept. This is useful if you want to use a type-safe class name in component props:
+
+```svelte
+
+
+
...
+```
+
## The `class:` directive
Prior to Svelte 5.16, the `class:` directive was the most convenient way to set classes on elements conditionally.
diff --git a/packages/svelte/elements.d.ts b/packages/svelte/elements.d.ts
index 604403f0a2..96f1589800 100644
--- a/packages/svelte/elements.d.ts
+++ b/packages/svelte/elements.d.ts
@@ -741,7 +741,7 @@ export interface HTMLAttributes extends AriaAttributes, D
accesskey?: string | undefined | null;
autocapitalize?: 'characters' | 'off' | 'on' | 'none' | 'sentences' | 'words' | undefined | null;
autofocus?: boolean | undefined | null;
- class?: string | import('clsx').ClassArray | import('clsx').ClassDictionary | undefined | null;
+ class?: ClassValue | undefined | null;
contenteditable?: Booleanish | 'inherit' | 'plaintext-only' | undefined | null;
contextmenu?: string | undefined | null;
dir?: 'ltr' | 'rtl' | 'auto' | undefined | null;
@@ -1522,7 +1522,7 @@ export interface SvelteWindowAttributes extends HTMLAttributes {
export interface SVGAttributes extends AriaAttributes, DOMAttributes {
// Attributes which also defined in HTMLAttributes
className?: string | undefined | null;
- class?: string | import('clsx').ClassArray | import('clsx').ClassDictionary | undefined | null;
+ class?: ClassValue | undefined | null;
color?: string | undefined | null;
height?: number | string | undefined | null;
id?: string | undefined | null;
@@ -2059,3 +2059,5 @@ export interface SvelteHTMLElements {
[name: string]: { [name: string]: any };
}
+
+export type ClassValue = string | import('clsx').ClassArray | import('clsx').ClassDictionary;