Vue- float-menu: Floating menu Component for Vue.js #.\n\nvue-float-menu is a completely customizable drifting menu you may contribute to you vue.js application. Engage along with a functioning demonstration.\n\nFeatures.\nYank and also position the menu anywhere on display.\nThe smart menu body senses the edges of the display as well as flips the menu automatically.\nHelp for embedded menus.\nKey-board Accessible.\nSupport for customized styles.\nBuilt along with Typescript.\nIntuitive API with records driven habits.\nDeveloped along with the all brand-new Vue 3.\nInstallation.\nyarn set up vue-float-menu.\nGetting going.\nvue-float-menu possesses some terrific nonpayments. Satisfy check out the props area for all available possibilities.\nvue-float-menu discovers the ideal menu orientation depending on the position of the food selection. for e.g if the food selection is actually placed near the bottom edge and the alignment readied to base, the component will instantly flip the orientation to leading.\nListed below is an essential instance that specifies the nonpayment position of the menu as top left.\n\n\nYank.\n\n\n\n\nProps.\nsize.\nstyle: amount.\nclassification: measurement of the Menu Scalp width x heightin pixels.\nsetting.\nkind: Strand.\nclassification: initial posture of the Menu Head. could be any kind of among the values top left, best right, lower left, lower right.\nrepaired.\ntype: Boolean.\nsummary: disables moving and also the menu will certainly be actually dealt with. make use of the position uphold to fix the food selection placement.\nmenu-dimension.\nkind: Item.\ndescription: establishes the width as well as lowest elevation of the Menu.\nmenu-data.\ntype: Object.\ndescription: information to create the menu. pertain to occupying the menu for usage details.\non-selected.\nkind: Feature.\nclassification: hook that is called on variety.\nmenu-style.\ntype: Strand.\nclassification: can be slide-out or accordion.slide-outis the default menu design.\nflip-on-edges.\nkind: Boolean.\nclassification: flips the food selection material on the best edges of the monitor.\nconcept.\nkind: Item.\nclassification: uphold to tailor the color schemes. recommend motif for use.\nPlacement.\nThe setting uphold may be utilized to specify the first position of the Menu Scalp. The set may approve any sort of some of the adhering to values.\nleading left (default).\nleading right.\nlower left.\nlower right.\n\n\n\n\n\nFood selection scalp dimension.\nsize set can be utilized to set the distance.\nas well as height of the food selection head. The uphold takes a solitary variety market value to specify.\nthe height and also distance of the Menu Crown.\n\n\n\n\n\nFood selection size.\nset to prepare the height and size of the food selection.\n\n\n\n\n\nFood selection Design.\nThe part maintains pair of modes slide-out( default) and accordion. The accordion design is preferable for smart phones.\n\n\n\n\n\n\nInhabiting the Menu.\nUtilize the menu-data set to make straightforward or even nested menus of your taste. menu-data takes a variety of MenuItem kind.\nMenuItem properties.\nhome.\nsummary.\ntitle.\ndisplay screen label of the menu thing.\nsubMenu.\ndata for the sub-menu.\ndisabled.\ndisables the food selection thing.\ndivider panel.\nmakes the thing as a divider panel.\nBelow our company produce a basic Menu construct along with 3 Menu things without any below menus.\n' const menuData = [title: \"New\",.\n\nlabel: \"Edit\",.\nsubMenu: \nname: \"edit-items\",.\nthings: [name: \"Copy\", name: \"Mix\", impaired: true],.\n,.\n,.\ndivider panel: accurate,.\n\nlabel: \"Open up Recent\",.\nsubMenu: \nname: \"recent-items\",.\nitems: [name: \"Paper 1\", divider: real, label: \"Paper 2\"],.\n,.\n,.\n] '.\n\n'.\n\n'.\non-select.\nhook for the food selection thing variety occasion.\n\n\n\nTurn on edges.\nestablishing this uphold flips the food selection material on the right sides of the monitor.\n\n\n\n\nMade Menu.\nTo disable yanking and to fix the position statically, prepared fixed to correct. This prop is turned off through default. Utilize this set together with the position uphold to set the wanted setting.\n\n\n\n\n\nCustomized icon.\nTo customize the Menu Icon, simply pass any kind of information in between the float-menu tags. Below our team render a customized symbol.\n\n\n\n\n\nand also right here we present a text Click on inside the Food selection deal with.\n\nClick.\n\n\nImage assistance.\nEach food selection item can be iconified as well as the part makes use of ports to inject the images.\nPass personal images (or graphics) as layouts noted with an unique port id. satisfy make sure the ids match the iconSlot home in the things assortment.\n\n\n\n\n\n\n\n\n\nexport default defineComponent( \nname: \"MenuExample\",.\ninformation() \nreturn \nthings: [label: \"New File\", iconSlot: \"new\",.\nlabel: \"New Window\", iconSlot: \"revise\",.\n]\n\n ).\nThis functions flawlessly also for embedded menu construct. Make sure the slot i.d. suit and also the part will deliver the icons suitably.\n\n\n\n\n\n\nexport default defineComponent( \ntitle: \"MenuExample\",.\nrecords() \ngain \nproducts: [name: \"edit\",.\nsubMenu: [label: \"reduce\", iconSlot: \"decrease\"],.\n]\n\n ).\nMotif.\nTailor the color pattern with the concept prop.\n\nClick.\n\nConstruct Create.\n# put up reliances.\nyarn install.\n\n# start dev.\nanecdote operate dev.\n\n# manage css linting.\nanecdote operate lint: css.\n\n# lint everything.\nyarn run dust: all.\n\n
package deal lib.npm operate rollup.Contributing.Fork it (https://github.com/prabhuignoto/vue-float-menu/fork ).Develop your attribute branch (git checkout -b new-feature).Commit your changes (git dedicate -am 'Add component').Press to the division (git press origin new-feature).Produce a new Pull Request.Created with.Details.The task uses vite instead of @vue/ cli. I select vite for velocity and i likewise strongly believe vite will definitely be the future.Meta.Prabhu Murthy-- @prabhumurthy2-- prabhu.m.murthy@gmail.com.https://www.prabhumurthy.com.Dispersed under the MIT permit. Go to certificate for additional information.https://github.com/prabhuingoto/.
Articles You Can Be Interested In