Comments (4)
This is working as intended. icon
prop is dual purpose: it performs styling (icon button) and allows for an icon to be passed through, but it is entirely intended to be used with an icon. when you provide content to the the default
slot, this overwrites all of the slot content (which includes the default generated icon), using the text
prop wouldn't render when icon
is being used, as the intended purpose of icon
is to display an icon. The equivalent text styling in this manner would be rounded="xl"
with text
prop
I will say however that there could probably be some pointers updated about this in the docs for clarification (and usage example should probably be fixed to hide default slot output when using the icon prop)
from vuetify.
The explanation makes sense and as I created this issue, I figured it was most likely functioning as designed & there was a bug with the documentation.
In respect of
using the
text
prop wouldn't render whenicon
is being used, as the intended purpose oficon
is to display an icon. The equivalent text styling in this manner would berounded="xl"
withtext
prop
What I was suggesting is that when using the text
prop with the icon
it could act as the text alternative for the icon, since the purpose of the icon
is to display the icon, then the text
prop purpose would be to ensure that the button's purpose is clear to all users.
For example:
<v-btn icon="mdi-refresh" text="Refresh"></v-btn>
could output the following
<v-btn aria-label="Refresh" icon="mdi-refresh"></v-btn>
from vuetify.
That sounds more like a feature request to have text
prop apply aria-label
(though doing <v-btn aria-label="Refresh" icon="mdi-refresh" />
works already by itself, and seems to already been discussed to a degree in #11937).
All in all icon
isn't intended to work with the text
prop outside of maybe using it as a textual avatar button substitute (eg <v-btn icon text="A" />
). It applies a strict circular icon button style (akin to v2's fab
), and if an icon is provided, displays the icon.
from vuetify.
Agreed, that would be a feature request. On that note, considering the details you've provided, I completely agree with you and I would view this issue as resolved with if the usage example were to hide the default slot output when using the icon prop.
from vuetify.
Related Issues (20)
- [Documentation] Deprecated useDisplay properties (xsOnly, smOnly, mdOnly, lgOnly, xlOnly)
- [Feature Request] Documentation for all the new versions
- [Bug Report][3.6.10] VDataTable group is not sorted when key is not in header HOT 4
- [Bug Report][3.6.10] VDataTable: GroupBy sort is not possible when sorting is disabled
- [Feature Request] Expose hasNext and hasPrev in v-slide-group
- [Bug Report][3.6.10] VSpeedDial content-class prop doesn't work
- [Documentation] code example of v-data-table prop filterable is not showcasing filterable
- [Feature Request] Support for Material Symbols
- [Bug Report][3.6.10] The date picker of the input is being stuck at the top/bottom if you scroll element out of the viewport
- [Feature Request] V3 V-Data-Table shift key multi-select
- [Bug Report][3.6.10] VNumberInput - increment/decrement slots only work with default control variant
- [Feature Request] Bring back VItemGroup valueComparator
- [Bug Report][3.6.7] calendar
- [Bug Report][3.6.10] The update:activated event of the VTreeview component did not take effect HOT 1
- [Feature Request] Label slot for VDateInput HOT 1
- [Bug Report][3.6.10] AutoComplete @update:search triggered on click
- [Bug Report][3.6.10] OTP Input Autofill not working on desktop
- [Bug Report][3.6.10] App v-footer causes "ResizeObserver loop completed with undelivered notifications" error message in Safari
- [Bug Report][3.6.10] Blinking button
- [Bug Report][3.6.10] The VTreeview component setting select-strategy='independent' is invalid HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from vuetify.