KTPortlet
is a Metronic's custom plugin defined in [root]/theme/default/src/assets/js/theme/core/base/portlet.js
.
KTPortlet
is a Metronic's custom plugin defined in [root]/theme/default/src/assets/js/theme/core/base/portlet.js
.
First parameter is the id, class, or tag of the HTML element. The second parameter is for the options.
var portlet = new KTPortlet(id, options);
var portlet = new KTPortlet('main_portlet', {
bodyToggleSpeed: 400,
tooltips: true,
tools: {
toggle: {
collapse: 'Collapse',
expand: 'Expand'
},
reload: 'Reload',
remove: 'Remove',
fullscreen: {
on: 'Fullscreen',
off: 'Exit Fullscreen'
}
},
sticky: {
offset: 300,
zIndex: 101
}
});
var options = {
bodyToggleSpeed: 400,
tooltips: true,
tools: {
toggle: {
collapse: 'Collapse',
expand: 'Expand'
},
reload: 'Reload',
remove: 'Remove',
fullscreen: {
on: 'Fullscreen',
off: 'Exit Fullscreen'
}
},
sticky: {
offset: 300,
zIndex: 101
}
};
Field | Type | Description | ||
---|---|---|---|---|
bodyToggleSpeed |
number |
Set the portlet body toggle speed in miliseconds
|
||
tooltips |
boolean |
Enable/disable portlet tooltips
|
||
tools.toggle |
object |
Portlet toggle tools options. Set the title for the collapse and expand toggle.
|
||
tools.reload |
string |
Set portlet reload title in the tools.
|
||
tools.remove |
string |
Set portlet remove title in the tools.
|
||
tools.fullscreen |
object |
Set portlet fullscreen title in the tools.
|
||
sticky.offset |
number |
Set the scroll offset for the sticky portlet header to appear.
|
||
sticky.zIndex |
number |
Set the portlet sticky header z-index.
|
<div class="kt-portlet">
<div class="kt-portlet__head">
<div class="kt-portlet__head-label">
<h3 class="kt-portlet__head-title"><!-- head title here --></h3>
</div>
</div>
<div class="kt-portlet__body">
<div class="kt-section">
<h3 class="kt-section__title"><!-- section title here --></h3>
<div class="kt-section__info"><!-- info here --></div>
<div class="kt-section__content kt-section__content--border">
<!-- content here -->
</div>
</div>
</div>
</div>
Atrribute | Description | ||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
k-portlet-tool |
Set an element in the portlet tools button to a specific action. Eg. <a href="#" kt-portlet-tool="remove">Remove</a>
|
Method | Description | ||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|
setDefaults(options) |
Set default options
|
||||||||||||
setContent(contents) |
Set dropdown content
|
||||||||||||
remove() |
Remove the portlet |
||||||||||||
reload() |
Reload the portlet |
||||||||||||
toggle() |
Toggle the portlet to collapse or expand |
||||||||||||
collapse() |
Set portlet to collapse |
||||||||||||
expand() |
Set portlet to expand |
||||||||||||
fullcreen() |
Set portlet to fullscreen |
||||||||||||
unFullcreen() |
Set portlet to default minimize |
||||||||||||
getBody() |
Get the portlet body as HTML object |
||||||||||||
getSelf() |
Get the portlet as HTML object |
||||||||||||
on(name, handler) |
Register event
|
||||||||||||
one(name, handler) |
Register event to be run once
|
I run a team of 20 product managers, developers, QA and UX resources. Previously we designed everything ourselves. For our newest platform we tried out Metronic. I cannot overestimate the impact Metronic has had. It's accelerated development 3x and reduced QA issues by 50%. If you add up the reduced need for design time/resources, the increase in dev speed and the reduction in QA, it's probably saved us $100,000 on this project alone, and I plan to use it for all platforms moving forward.
The flexibility of the design has also allowed us to put out a better looking & working platform and reduced my headaches by 90%. Thank you KeenThemes!
Everything within Metronic is customizable globally to provide limitless unique styled projects
Choose a perfect design for your next project among hundreds of demos
A huge collection of components to power your application with the latest UI/UX trands
Enterprise ready Angular 7 integration with built-in authentication module and many more
Metronic deeply customizes Bootstrap with native look and feel
Our super sleek and intuitive Datatable comes packed with all advanced CRUD features
Metronic is the only theme trusted by over 70,000 developers world wide
Lifetime updates with new demos and features is guaranteed
Metronic is written with a code structure that all developers will be able to pick up easily and fall in love