Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
27 changes: 27 additions & 0 deletions packages/docs/src/pages/en/getting-started/upgrade-guide.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,3 +21,30 @@ This page contains a detailed list of breaking changes and the steps required to

- Returned Refs are now readonly.
- Breakpoints are matched with `window.matchMedia` instead of `window.innerWidth`. This may result in slightly different values at zoom levels other than 100%.

## Theme

The theme system now uses `@vuetify/v0` under the hood. The consumer API (`useTheme`, `VThemeProvider`) is unchanged for most users.

### ThemeInstance

Several properties have been removed from the `ThemeInstance` type:

- `styles` — CSS injection is now handled internally by the theme adapter
- `isDisabled` — themes are always enabled
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

isDisabled still exists in parsedOptions but isn't exposed in ThemeInstance because...?

- `isSystem` — check `name.value === 'system'` directly

### Runtime theme changes

Assigning new themes directly to `themes.value` is replaced by `register()`:

```diff
- theme.themes.value.custom = { dark: true, colors: { primary: '#ff5722' } }
+ theme.register({ id: 'custom', dark: true, colors: { primary: '#ff5722' } })
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

useTheme does not expose register yet

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I assume this surgically adds specific fields to the theme. Let's say one piece of code sets primary, another one picks surface color - they should not interfere.. My previous demo does not work yet, so I am speculating.

```

Mutating existing theme colors continues to work:
Copy link
Copy Markdown
Contributor

@J-Sek J-Sek Apr 2, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

not true at the moment


```ts
theme.themes.value.light.colors.primary = '#ff0000'
```
33 changes: 22 additions & 11 deletions packages/vuetify/src/components/VThemeProvider/VThemeProvider.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
// Styles
import './VThemeProvider.sass'

// Components
import { Theme } from '@vuetify/v0/components'

// Composables
import { makeComponentProps } from '@/composables/component'
import { makeTagProps } from '@/composables/tag'
Expand All @@ -26,19 +29,27 @@ export const VThemeProvider = genericComponent()({
const { themeClasses } = provideTheme(props)

return () => {
if (!props.withBackground) return slots.default?.()
if (!props.withBackground) {
return (
<Theme theme={ props.theme } renderless>
{ slots.default?.() }
</Theme>
)
}

return (
<props.tag
class={[
'v-theme-provider',
themeClasses.value,
props.class,
]}
style={ props.style }
>
{ slots.default?.() }
</props.tag>
<Theme theme={ props.theme } renderless>
<props.tag
class={[
'v-theme-provider',
themeClasses.value,
props.class,
]}
style={ props.style }
>
{ slots.default?.() }
</props.tag>
</Theme>
)
}
},
Expand Down
Loading
Loading