Skip to content

Conversation

@blalan05
Copy link
Member

<template>
  <v-container>
    <v-defaults-provider :defaults="blueprint">
      <v-alert text="Lorem ipsum dolor sit amet consectetur adipisicing elit.">
        <template #close>
          <v-icon-btn icon="$close" />
        </template>
      </v-alert>
    </v-defaults-provider>
  </v-container>
</template>
<script setup lang="ts">
  const blueprint = {
    VAlert: {
      class: 'pa-0',
      '#text': {
        class: 'pl-4 py-4',
      },
      '#close': {
        VIconBtn: {
          rounded: 'lg',
          class: 'mx-0 my-2',
        },
      },
    },
  }
</script>

@blalan05 blalan05 self-assigned this Nov 10, 2025
@blalan05 blalan05 added the E: defaults Defaults composable label Nov 10, 2025

return (
<VDefaultsProvider defaults={ componentDefaults as any }>
<div { ...directProps }>
Copy link
Member

Choose a reason for hiding this comment

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

Not every slot should create its own element, this probably breaks a lot of styles.

'#text': {
  class: 'pl-4 py-4',
},

should either only work only for specific slots or not be supported at all.

Copy link
Member Author

@blalan05 blalan05 Nov 17, 2025

Choose a reason for hiding this comment

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

I understand the issue and agree, can we find an alternative ergonomic method for blueprints?
image
VS.
image

@blalan05 blalan05 force-pushed the default-provider-slots branch from 5ce254d to 79e7bc6 Compare November 17, 2025 17:03
@blalan05 blalan05 force-pushed the default-provider-slots branch from 79e7bc6 to cfe77ed Compare November 17, 2025 17:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

E: defaults Defaults composable

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants