@travlrcom/uikit
Version:
TRAVLR UiKit
344 lines (286 loc) • 16.1 kB
HTML
<html lang="en">
<head>
<base href="/">
<meta charset="utf-8"/>
<meta name="theme-color" content="#006272"/>
<meta name="viewport" content="width=device-width, initial-scale=1.0"/>
<meta name="robots" content="index, follow">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<link rel="canonical" href="/">
<link rel="manifest" href="manifest.json">
<title>Button - TRAVLR UI Kit</title>
<meta name="description" content="TRAVLR UI Kit A simple and clean framework making front-end web development fast & easy. Fully responsive and filled with cool stuff.">
<!-- Facebook -->
<meta property="og:title" content="TRAVLR UI Kit">
<meta property="og:description" content="TRAVLR UI Kit A simple and clean framework making front-end web development fast & easy. Fully responsive and filled with cool stuff.">
<meta property="og:type" content="website" />
<meta property="og:url" content="Travlr Facebook Url">
<meta property="og:image" content="Travlr Facebook Image">
<meta property="fb:app_id" content="FACEBOOK_APP_ID" />
<meta property="og:site_name" content="TRAVLR UI Kit=">
<!-- Twitter -->
<meta name="twitter:card" content="summary" />
<meta name="twitter:site" content="Travlr Twitter Account" />
<meta name="twitter:title" content="TRAVLR UI Kit">
<meta name="twitter:description" content="TRAVLR UI Kit A simple and clean framework making front-end web development fast & easy. Fully responsive and filled with cool stuff.">
<meta property="twitter:image" content="Travlr Twitter Image">
<!-- Favicon -->
<link rel="shortcut icon" href="">
<!-- Fonts -->
<link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Montserrat:400,600,700">
<!-- Vendors -->
<link href="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/9.13.1/styles/color-brewer.min.css" rel="stylesheet"/>
<!-- Google Tag Manager -->
</head>
<body class="travlr-ui">
<div id="app">
<!-- core nav top -->
<%= require('html-loader!./../components/header.html') %>
<!-- core nav top end -->
<!-- Begin Main Content -->
<main class="t-main-content">
<!-- section hero main -->
<section class=" t-section-small">
<div class="t-container">
<div class="t-columns t-columns-with-gap">
<div class="t-col-12">
<ul class="t-breadcrumb">
<li class="t-breadcrumb-item active">
<a href="/">Home</a>
</li>
<li class="t-breadcrumb-item active">
<a href="/documentations.html">Documentations</a>
</li>
<li class="t-breadcrumb-item disabled">
<a href="#">Button</a>
</li>
</ul>
</div>
</div>
</div>
</section>
<!-- section hero main end -->
<!-- Begin Getting Started -->
<section class="t-p-b-32">
<div class="t-container">
<div class="t-columns t-columns-with-gap">
<!-- Begin Left Description -->
<%= require('html-loader!./../components/sidebar-documentation.html') %>
<!-- End Left Description -->
<!-- Begin Right Description -->
<div class="t-col-8 t-col-mobile-12">
<div class="t-box t-box-with-shadow">
<!-- Begin Button -->
<h2 class="t-heading-4 t-color-grey-darkest">Button</h2>
<p class="t-body-text t-m-t-32 t-m-b-32">
TRAVLR UI Kit uses Button font icons which are composed of some 250+ icons. Easily style icons using border color classes, background color classes and size classes. Highlight icons using the class.
</p>
<div class="t-panel t-primary-box-shadow t-no-margin">
<div class="t-panel-header t-p-t-0 t-background-grey-lightest">
<div class="t-panel-header-title">
Example
</div>
</div>
<div class="t-panel-body">
<div class="t-columns t-columns-with-gap">
<div class="t-col-10">
<pre>
<code class="xml hljs" id="button-1">
<button class="t-btn t-btn-primary"></button>
<button class="t-btn t-btn-secondary"></button>
<button class="t-btn t-btn-tertiary"></button>
<button class="t-btn t-btn-default"></button>
<button class="t-btn t-btn-inverted"></button>
<button class="t-btn t-btn-anchor"></button>
<button class="t-btn t-btn-primary disabled" disabled></button>
<button class="t-btn t-btn-primary t-btn-with-icon">
<span class="t-icon icon-heart"></span> Button
</button>
</code>
</pre>
</div>
<div class="t-col-2 t-text-align-right">
<button data-clipboard-action="copy" data-clipboard-target="#button-1" class="copyText t-btn t-btn-tertiary t-btn-small t-hidden-mobile">Copy</button>
</div>
</div>
</div>
</div>
<div class="t-m-t-32">
<div class="t-columns t-columns-with-gap">
<div class="t-col-4 t-col-mobile-12 t-text-align-center t-m-b-24 t-p-t-8 t-p-b-8">
<button class="t-btn t-btn-primary">Primary</button>
</div>
<div class="t-col-4 t-col-mobile-12 t-text-align-center t-m-b-24 t-p-t-8 t-p-b-8">
<button class="t-btn t-btn-secondary">Secondary</button>
</div>
<div class="t-col-4 t-col-mobile-12 t-text-align-center t-m-b-24 t-p-t-8 t-p-b-8">
<button class="t-btn t-btn-tertiary">Tertiary</button>
</div>
<div class="t-col-4 t-col-mobile-12 t-text-align-center t-m-b-24 t-p-t-8 t-p-b-8">
<button class="t-btn t-btn-default">Default</button>
</div>
<div class="t-col-4 t-col-mobile-12 t-text-align-center">
<div class="t-background-grey-darkest t-p-t-8 t-p-b-8">
<button class="t-btn t-btn-inverted">Inverted</button>
</div>
</div>
<div class="t-col-4 t-col-mobile-12 t-text-align-center t-m-b-24 t-p-t-8 t-p-b-8">
<button class="t-btn t-btn-anchor">Anchor</button>
</div>
<div class="t-col-4 t-col-mobile-12 t-text-align-center t-m-b-24 t-p-t-8 t-p-b-8">
<button class="t-btn t-btn-primary disabled" disabled>Disabled</button>
</div>
<div class="t-col-4 t-col-mobile-12 t-text-align-center t-m-b-24 t-p-t-8 t-p-b-8">
<button class="t-btn t-btn-primary t-btn-with-icon">
<span class="t-icon icon-heart-o"></span>Button
</button>
</div>
</div>
</div>
<!-- End Button -->
<div class="t-separator t-m-t-32 t-m-b-32"></div>
<!-- Begin Button Size -->
<h2 class="t-heading-4 t-color-grey-darkest">Button Size</h2>
<p class="t-body-text t-m-t-32 t-m-b-32">
Rollover any icon to see icon class name.
</p>
<div class="t-panel t-primary-box-shadow t-no-margin">
<div class="t-panel-header t-p-t-0 t-background-grey-lightest">
<div class="t-panel-header-title">
Example
</div>
</div>
<div class="t-panel-body">
<div class="t-columns t-columns-with-gap">
<div class="t-col-10">
<pre>
<code class="xml hljs" id="button-2">
<button class="t-btn t-btn-primary t-btn-small"></button>
<button class="t-btn t-btn-primary"></button>
<button class="t-btn t-btn-primary t-btn-large"></button>
<button class="t-btn t-btn-primary t-btn-full"></button>
<button class="t-btn t-btn-primary t-btn-full-on-mobile"></button>
</code>
</pre>
</div>
<div class="t-col-2 t-text-align-right">
<button data-clipboard-action="copy" data-clipboard-target="#button-2" class="copyText t-btn t-btn-tertiary t-btn-small t-hidden-mobile">Copy</button>
</div>
</div>
</div>
</div>
<div class="t-columns t-columns-with-gap t-m-t-32">
<div class="t-col-4 t-col-mobile-12 t-text-align-center t-m-b-24">
<button class="t-btn t-btn-primary t-btn-small">Small</button>
</div>
<div class="t-col-4 t-col-mobile-12 t-text-align-center t-m-b-24">
<button class="t-btn t-btn-secondary">Normal</button>
</div>
<div class="t-col-4 t-col-mobile-12 t-text-align-center t-m-b-24">
<button class="t-btn t-btn-tertiary t-btn-large">Large</button>
</div>
<div class="t-col-4 t-col-mobile-12 t-text-align-center">
<button class="t-btn t-btn-primary t-btn-full">Full Width</button>
</div>
<div class="t-col-4 t-col-mobile-12 t-text-align-center">
<button class="t-btn t-btn-secondary t-btn-full-on-mobile">Full width on mobile</button>
</div>
</div>
<!-- End Button Size -->
<div class="t-separator t-m-t-32 t-m-b-32"></div>
<!-- Begin Button Toggle -->
<h2 class="t-heading-4 t-color-grey-darkest">Button Toggle</h2>
<p class="t-body-text t-m-t-32 t-m-b-32">
Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged.
</p>
<div class="t-panel t-primary-box-shadow t-no-margin">
<div class="t-panel-header t-p-t-0 t-background-grey-lightest">
<div class="t-panel-header-title">
Example
</div>
</div>
<div class="t-panel-body">
<div class="t-columns t-columns-with-gap">
<div class="t-col-10">
<pre>
<code class="xml hljs" id="button-2">
<button class="t-btn t-btn-primary t-btn-full" trv-toggle="button" trv-button="#primary">Primary</button>
<button class="t-btn t-btn-secondary t-btn-full" trv-toggle="button" trv-button="#secondary" trv-status="false">Secondary</button>
<button class="t-btn t-btn-tertiary t-btn-full" trv-toggle="button" trv-button="#tertiary" trv-status="false">Tertiary</button>
</code>
</pre>
</div>
<div class="t-col-2 t-text-align-right">
<button data-clipboard-action="copy" data-clipboard-target="#button-2" class="copyText t-btn t-btn-tertiary t-btn-small t-hidden-mobile">Copy</button>
</div>
</div>
</div>
</div>
<div class="t-columns t-columns-with-gap t-m-t-32">
<div class="t-col-4 t-col-mobile-12 t-text-align-center t-m-b-24">
<button class="t-btn t-btn-primary t-btn-full" trv-toggle="button" trv-button="#primary">Primary</button>
</div>
<div class="t-col-4 t-col-mobile-12 t-text-align-center t-m-b-24">
<button class="t-btn t-btn-secondary t-btn-full" trv-toggle="button" trv-button="#secondary" trv-status="false">Secondary</button>
</div>
<div class="t-col-4 t-col-mobile-12 t-text-align-center t-m-b-24">
<button class="t-btn t-btn-tertiary t-btn-full" trv-toggle="button" trv-button="#tertiary" trv-status="false">Tertiary</button>
</div>
<div class="t-col-4 t-col-mobile-12 t-text-align-center">
Single toggle primary status : <span trv-data="#primary">false</span>
</div>
<div class="t-col-4 t-col-mobile-12 t-text-align-center">
Single toggle secondary status : <span trv-data="#secondary">false</span>
</div>
<div class="t-col-4 t-col-mobile-12 t-text-align-center">
Single toggle tertiary status : <span trv-data="#tertiary">false</span>
</div>
</div>
<!-- End Button Toggle -->
<%= require('html-loader!./../components/footer-documentation.html') %>
</div>
</div>
</div>
<!-- End Right Description -->
</div>
</div>
</section>
<!-- End Getting Started -->
</main>
<!-- End Main Content -->
<!-- core nav bottom -->
<%= require('html-loader!./../components/footer.html') %>
<!-- core nav bottom -->
</div>
<script>
window.onload = function () {
TravlrUikit.button({
// element: '[trv-button="primary"]', // without element, load all element button
afterAction: function (ctx) {
var buttonName = ctx._elementContext.getAttribute('trv-button')
$TravlrSelector('[trv-data="'+ buttonName +'"]')[0].innerHTML = ctx._isActive
}
})
TravlrUikit.button({
element: '[trv-button="#tertiary"]',
afterAction: function (ctx) {
var buttonName = ctx._elementContext.getAttribute('trv-button')
$TravlrSelector('[trv-data="'+ buttonName +'"]')[0].innerHTML = ctx._isActive
}
})
// Event Listener Active Primary Button in First Load
$TravlrSelector('[trv-button="#primary"]').forEach(function (element) {
$TravlrEvent({
type: 'trigger',
eventName: 'active.trv.button',
element: element
})
})
}
</script>
<!-- core nav bottom script -->
<%= require('html-loader!./../components/footer-script.html') %>
<!-- core nav bottom script -->
</body>
</html>