Comments (3)
Sounds good! I think the tabs are more usual as an starting point I will add that to my todo list
from vue-tailwind.
I love this, I'm moving over from vuetify to this. So I'll jump in with pull requests and what-not. Also, do you know for the dropdown, can we replace text with an icon so it looks something like so:
Should I create a new issue for that?
from vue-tailwind.
Yeah its possible you can use the button-content
slot
<t-dropdown>
<template v-slot:button-content >
<icon>
</template>
<p>Content of the dropdown</p>
</t-dropdown>
Notice that this component internally uses a <t-button />
so you probably will need to update the template of the button also, you can do that with the buttonProps
prop
This a piece of code of a project where I do something like that:
<t-dropdown
v-if="actions.length"
:visible-arrow="false"
:button-props="{
baseClass: 'h-full border-0 rounded-lg overflow-hidden p-0 bg-transparent',
defaultClass: '',
defaultSizeClass: ''
}"
placement="bottom-end"
class="ml-auto block sm:hidden"
dropdown-class="bg-white rounded-lg flex flex-col py-2 shadow-xl z-10 mt-3 w-56"
>
<template v-slot:button-content="{ shown }">
<span
:class="[
'flex h-full w-full py-2 px-3 text-white rounded-lg',
shown ? 'bg-gray-600' : 'bg-gray-700 hover:bg-gray-800',
]"
>
<icon
class="fill-current"
name="menu"
width="20"
heigth="20"
/>
</span>
</template>
<nuxt-link
v-for="({ text, to, variant }, index) in actions"
:key="index"
:to="to"
class="block hover:text-white text-gray-800 px-4 py-2 hover:bg-indigo-500 w-full text-left"
>{{ text }}</nuxt-link>
</t-dropdown>
PD: im not happy with how the button props work in this component I probably will refactor it soon
from vue-tailwind.
Related Issues (20)
- TRichSelect - Buttons in DropdownUp and DropdownDown do not register click in Safari
- How to display Datepicker only year?
- [help wanted] t-rich-select grouping options HOT 1
- How to blur T-rich-select dropdown upon select
- Dropdown without JavaScript
- <router-link>'s tag prop is deprecated
- Pagination in Rich Select HOT 3
- Semantic TCard (and others)
- not working with vueJS3
- Checkbox not working, value never changes HOT 2
- 🚨 [Important]: project status
- Header Modal Customize
- Variants don't work
- How use t-dropdown in file .tsx HOT 1
- Build for production with Vite? HOT 9
- Rich Select multiple placeholder not rendering
- Time in french
- Can't see search results in TRichSelect when using the fetchOptions method HOT 1
- Pass additional variable to fetchOptions HOT 2
- Rich Select Selected Label for Multiple
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 vue-tailwind.