webworld888/resources/markup/xe-ui-component/01_buttons.html
2021-10-26 19:14:12 +09:00

305 lines
16 KiB
HTML

<!DOCTYPE html>
<html lang="ko">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0, user-scalable=no">
<title>Theme - xe-ui-component</title>
<!-- core -->
<!-- core -->
<link href="../../../assets/core/common/css/xe-common.css" rel="stylesheet" media="all">
<link href="../../../assets/core/xe-ui-component/xe-ui-component.css" rel="stylesheet" media="all">
<link href="https://cdn.jsdelivr.net/npm/xeicon@2.3/xeicon.min.css" rel="stylesheet" media="all">
<script>var xeBaseURL = '../../../';</script>
<script src="../../../assets/vendor.js" type="text/javascript"></script>
<script src="../../../assets/common.js" type="text/javascript"></script>
<script src="../../../assets/core/common/js/xe.bundle.js" type="text/javascript"></script>
<!-- additional -->
<link href="./sample/css/layout.css" rel="stylesheet" media="all">
<link href="./sample/css/prism.css" rel="stylesheet" media="all">
<script src="./sample/js/layout.js"></script>
<script src="./sample/js/prism.js"></script>
</head>
<body class="body sub-skin desktop">
<div class="main-wrap transition">
<div class="sub-content xe-container ui-contents">
<!-- sub content area -->
<h2>Buttons</h2>
<p>
XE3에서 기본으로 사용하는 button에 대한 예시입니다.
</p>
<!-- <strong><a href="#">h2 title</a></strong> -->
<ul class="index-list">
<li><a href="#example">Example</a></li>
<li><a href="#tags">Button tags</a></li>
<li><a href="#sizes">Button sizes</a></li>
<li><a href="#outline">Outline buttons</a></li>
<li><a href="#toggle">Toggle buttons</a></li>
<li><a href="#active">Active state</a></li>
<li><a href="#disabled">Disabled state</a></li>
</ul>
<h3><a href="#example" name="example">Examples</a></h3>
<div class="xe-row">
<div class="xe-col-md-4">
<p>
클래스로 구분하여 상황에 맞는 버튼을 사용합니다.
</p>
</div>
<div class="xe-col-md-8">
<button type="button" class="xe-btn">default</button>
<button type="button" class="xe-btn xe-btn-primary">primary</button>
<button type="button" class="xe-btn xe-btn-secondary">secondary</button>
<button type="button" class="xe-btn xe-btn-success">success</button>
<button type="button" class="xe-btn xe-btn-positive">positive</button>
<button type="button" class="xe-btn xe-btn-warning">warning</button>
<button type="button" class="xe-btn xe-btn-danger">danger</button>
<button type="button" class="xe-btn xe-btn-fail">fail</button>
<button type="button" class="xe-btn xe-btn-link">링크</button>
<pre><code class="language-markup">&lt;button type="button" class="xe-btn"&gt;default&lt;/button&gt;
&lt;button type="button" class="xe-btn xe-btn-primary"&gt;primary&lt;/button&gt;
&lt;button type="button" class="xe-btn xe-btn-secondary"&gt;secondary&lt;/button&gt;
&lt;button type="button" class="xe-btn xe-btn-success"&gt;success&lt;/button&gt;
&lt;button type="button" class="xe-btn xe-btn-positive"&gt;positive&lt;/button&gt;
&lt;button type="button" class="xe-btn xe-btn-warning"&gt;warning&lt;/button&gt;
&lt;button type="button" class="xe-btn xe-btn-danger"&gt;danger&lt;/button&gt;
&lt;button type="button" class="xe-btn xe-btn-fail"&gt;fail&lt;/button&gt;
&lt;button type="button" class="xe-btn xe-btn-link"&gt;link&lt;/button&gt;
</code></pre>
</div>
</div>
<h3><a href="#tags" name="tags">Button tags</a></h3>
<div class="xe-row">
<div class="xe-col-md-4">
<p>
<code>&lt;a&gt;</code>, <code>&lt;button&gt;</code>, <code>&lt;input&gt;</code> 서로 다른 요소에서도 같은 스타일로 보여지게 됩니다.
</p>
</div>
<div class="xe-col-md-8">
<a href="#" class="xe-btn">Link</a>
<button type="button" class="xe-btn">button</button>
<input class="xe-btn" type="button" value="Input">
<input class="xe-btn" type="submit" value="Submit">
<pre><code class="language-markup">&lt;a href="#" class="xe-btn"&gt;Link&lt;/a&gt;
&lt;button type="button" class="xe-btn"&gt;button&lt;/button&gt;
&lt;input class="xe-btn" type="button" value="Input"&gt;
&lt;input class="xe-btn" type="submit" value="Submit"&gt;
</code></pre>
</div>
</div>
<h3><a href="#sizes" name="sizes">Button sizes</a></h3>
<div class="xe-row">
<div class="xe-col-md-4">
<p>
<code>.xe-btn-xs</code>, <code>.xe-btn-sm</code>, <code>.xe-btn-lg</code> 클래스에 따라 버튼 크기를 조절할 수 있습니다.
</p>
</div>
<div class="xe-col-md-8">
<button type="button" class="xe-btn xe-btn-primary xe-btn-xs">Extra small</button>
<button type="button" class="xe-btn xe-btn-primary xe-btn-sm">Small</button>
<button type="button" class="xe-btn xe-btn-primary">Default</button>
<button type="button" class="xe-btn xe-btn-primary xe-btn-lg">Large</button>
<pre><code class="language-markup">&lt;button type="button" class="xe-btn xe-btn-primary xe-btn-xs"&gt;Extra small&lt;/button&gt;
&lt;button type="button" class="xe-btn xe-btn-primary xe-btn-sm"&gt;Small&lt;/button&gt;
&lt;button type="button" class="xe-btn xe-btn-primary"&gt;Default&lt;/button&gt;
&lt;button type="button" class="xe-btn xe-btn-primary xe-btn-lg"&gt;Large&lt;/button&gt;
</code></pre>
<p>
<code>.xe-btn-block</code> 클래스를 추가하여 꽉찬 너비의 버튼을 만듭니다.
</p>
<button type="button" class="xe-btn xe-btn-primary xe-btn-block">xe-btn-block</button>
<button type="button" class="xe-btn xe-btn-secondary xe-btn-block">xe-btn-block</button>
<pre><code class="language-markup">&lt;button type="button" class="xe-btn xe-btn-primary xe-btn-block"&gt;xe-btn-block&lt;/button&gt;
&lt;button type="button" class="xe-btn xe-btn-secondary xe-btn-block"&gt;xe-btn-block&lt;/button&gt;</code></pre>
</div>
</div>
<h3><a href="#outline" name="outline">Outline buttons</a></h3>
<div class="xe-row">
<div class="xe-col-md-4">
<p>
<code>.*-outline</code> 클래스 통해 BG 없어 border로만 이루어져 있는 버튼 스타일을 사용할 수 있습니다.
</p>
</div>
<div class="xe-col-md-8">
<button type="button" class="xe-btn xe-btn-primary-outline">primary</button>
<button type="button" class="xe-btn xe-btn-success-outline">success</button>
<button type="button" class="xe-btn xe-btn-positive-outline">positive</button>
<button type="button" class="xe-btn xe-btn-warning-outline">warning</button>
<button type="button" class="xe-btn xe-btn-danger-outline">danger</button>
<button type="button" class="xe-btn xe-btn-fail-outline">fail</button>
<pre><code class="language-markup">&lt;button type="button" class="xe-btn xe-btn-primary-outline"&gt;primary&lt;/button&gt;
&lt;button type="button" class="xe-btn xe-btn-success-outline"&gt;success&lt;/button&gt;
&lt;button type="button" class="xe-btn xe-btn-positive-outline"&gt;positive&lt;/button&gt;
&lt;button type="button" class="xe-btn xe-btn-warning-outline"&gt;warning&lt;/button&gt;
&lt;button type="button" class="xe-btn xe-btn-danger-outline"&gt;danger&lt;/button&gt;
&lt;button type="button" class="xe-btn xe-btn-fail-outline"&gt;fail&lt;/button&gt;
</code></pre>
</div>
</div>
<h3><a href="#toggle" name="toggle">Toggle button</a></h3>
<div class="xe-row">
<div class="xe-col-md-4">
<p>on/off를 명확히 표현하기 위해 토글 버튼을 사용합니다. </p>
</div>
<div class="xe-col-md-8">
<div class="xe-btn-toggle">
<label>
<span class="xe-sr-only">toggle</span>
<input type="checkbox" checked="">
<span class="toggle"></span>
</label>
</div>
<div class="xe-btn-toggle">
<label>
<span class="xe-sr-only">toggle</span>
<input type="checkbox">
<span class="toggle"></span>
</label>
</div>
<pre><code class="language-markup">&lt;div class="xe-btn-toggle"&gt;
&lt;label&gt;
&lt;span class="xe-sr-only"&gt;toggle&lt;/span&gt;
&lt;input type="checkbox" checked=""&gt;
&lt;span class="toggle"&gt;&lt;/span&gt;
&lt;/label&gt;
&lt;/div&gt;
&lt;div class="xe-btn-toggle"&gt;
&lt;label&gt;
&lt;span class="xe-sr-only"&gt;toggle&lt;/span&gt;
&lt;input type="checkbox"&gt;
&lt;span class="toggle"&gt;&lt;/span&gt;
&lt;/label&gt;
&lt;/div&gt;
</code></pre>
</div>
</div>
<h3><a href="#active" name="active">Active state</a></h3>
<div class="xe-row">
<div class="xe-col-md-4">
<p>
<code>.active</code> 클래스를 추가하여 활성화 상태를 표시합니다.
</p>
</div>
<div class="xe-col-md-8">
<button type="button" class="xe-btn xe-btn-primary active">primary</button>
<button type="button" class="xe-btn xe-btn-secondary active">primary</button>
<pre><code class="language-markup">&lt;button type="button" class="xe-btn xe-btn-primary active"&gt;primary&lt;/button&gt;
&lt;button type="button" class="xe-btn xe-btn-secondary active"&gt;primary&lt;/button&gt;
</code></pre>
</div>
</div>
<h3><a href="#disabled" name="disabled">Disabled state</a></h3>
<div class="xe-row">
<div class="xe-col-md-4">
<p>
<code>:disabled</code> attribute 또는 <code>.disabled</code> 클래스 통해 비활성화 상태를 표시합니다.
</p>
</div>
<div class="xe-col-md-8">
<button type="button" class="xe-btn xe-btn-primary" disabled="">button:disabled</button>
<button type="button" class="xe-btn xe-btn-secondary" disabled="">button:disabled</button>
<div class="xe-btn-toggle">
<label>
<span class="xe-sr-only">toggle</span>
<input type="checkbox" checked="" disabled="">
<span class="toggle"></span>
</label>
</div>
<div class="xe-btn-toggle">
<label>
<span class="xe-sr-only">toggle</span>
<input type="checkbox" disabled="">
<span class="toggle"></span>
</label>
</div>
<pre><code class="language-markup">&lt;button type="button" class="xe-btn xe-btn-primary" disabled=""&gt;button:disabled&lt;/button&gt;
&lt;button type="button" class="xe-btn xe-btn-secondary" disabled=""&gt;button:disabled&lt;/button&gt;
&lt;div class="xe-btn-toggle"&gt;
&lt;label&gt;
&lt;span class="xe-sr-only"&gt;toggle&lt;/span&gt;
&lt;input type="checkbox" checked="" disabled=""&gt;
&lt;span class="toggle"&gt;&lt;/span&gt;
&lt;/label&gt;
&lt;/div&gt;
&lt;button type="button" class="xe-btn xe-btn-secondary" disabled=""&gt;button:disabled&lt;/button&gt;
&lt;div class="xe-btn-toggle"&gt;
&lt;label&gt;
&lt;span class="xe-sr-only"&gt;toggle&lt;/span&gt;
&lt;input type="checkbox" disabled=""&gt;
&lt;span class="toggle"&gt;&lt;/span&gt;
&lt;/label&gt;
&lt;/div&gt;
</code></pre>
<p>
<code>&lt;a&gt;</code> 요소는 <code>:disabled</code> 를 지원하지 않아 <code>.disabled</code> 클래스로 적용해야 합니다.
</p>
<a href="#" class="xe-btn xe-btn-primary disabled">a.disabled</a>
<a href="#" class="xe-btn xe-btn-secondary disabled">a.disabled</a>
<pre><code class="language-markup">&lt;a href="#" class="xe-btn xe-btn-primary disabled"&gt;a.disabled&lt;/a&gt;
&lt;a href="#" class="xe-btn xe-btn-secondary disabled"&gt;a.disabled&lt;/a&gt;</code></pre>
</div>
</div>
<h3><a href="#disabled" name="disabled">Button groups</a></h3>
<div class="xe-row">
<div class="xe-col-md-4">
<p>
부모에 <code>.xe-btn-group</code> 추가 시 버튼들을 하나의 그룹핑된 스타일로 보여지게 됩니다.
</p>
</div>
<div class="xe-col-md-8">
<div class="xe-btn-group xe-btn-group-lg">
<button type="button" class="xe-btn">Left</button>
<button type="button" class="xe-btn">Middle</button>
<button type="button" class="xe-btn">Right</button>
</div><br><br>
<div class="xe-btn-group">
<button type="button" class="xe-btn">Left</button>
<button type="button" class="xe-btn">Middle</button>
<button type="button" class="xe-btn">Right</button>
</div><br><br>
<div class="xe-btn-group xe-btn-group-sm">
<button type="button" class="xe-btn">Left</button>
<button type="button" class="xe-btn">Middle</button>
<button type="button" class="xe-btn">Right</button>
</div><br><br>
<div class="xe-btn-group xe-btn-group-xs">
<button type="button" class="xe-btn">Left</button>
<button type="button" class="xe-btn">Middle</button>
<button type="button" class="xe-btn">Right</button>
</div>
<pre><code class="language-markup">&lt;div class="xe-btn-group xe-btn-group-lg"&gt;
&lt;button type="button" class="xe-btn"&gt;Left&lt;/button&gt;
&lt;button type="button" class="xe-btn"&gt;Middle&lt;/button&gt;
&lt;button type="button" class="xe-btn"&gt;Right&lt;/button&gt;
&lt;/div&gt;
&lt;div class="xe-btn-group"&gt;
&lt;button type="button" class="xe-btn"&gt;Left&lt;/button&gt;
&lt;button type="button" class="xe-btn"&gt;Middle&lt;/button&gt;
&lt;button type="button" class="xe-btn"&gt;Right&lt;/button&gt;
&lt;/div&gt;
&lt;div class="xe-btn-group xe-btn-group-sm"&gt;
&lt;button type="button" class="xe-btn"&gt;Left&lt;/button&gt;
&lt;button type="button" class="xe-btn"&gt;Middle&lt;/button&gt;
&lt;button type="button" class="xe-btn"&gt;Right&lt;/button&gt;
&lt;/div&gt;
&lt;div class="xe-btn-group xe-btn-group-xs"&gt;
&lt;button type="button" class="xe-btn"&gt;Left&lt;/button&gt;
&lt;button type="button" class="xe-btn"&gt;Middle&lt;/button&gt;
&lt;button type="button" class="xe-btn"&gt;Right&lt;/button&gt;
&lt;/div&gt;</code></pre>
</div>
</div>
</div>
</div>
</body>
</html>