mirror of
https://github.com/shoelace-style/webawesome.git
synced 2026-01-12 20:19:13 +00:00
* Switch RawGit to unpkg * Switch RawGit to unpkg in docs * Switch RawGit to unpkg in layout
221 lines
11 KiB
HTML
221 lines
11 KiB
HTML
<!DOCTYPE html>
|
||
<html lang="en">
|
||
<head>
|
||
<meta charset="UTF-8">
|
||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||
<meta http-equiv="X-UA-Compatible" content="ie=edge">
|
||
<meta name="description" content="Add styled buttons to your app with minimal effort.">
|
||
<link rel="icon" href="../source/img/favicon.png">
|
||
<link rel="stylesheet" href="../dist/shoelace.css">
|
||
<link rel="stylesheet" href="../source/css/_docs.css">
|
||
<link rel="stylesheet" href="https://unpkg.com/prism-theme-one-dark@1.0.0/prism-onedark.css" integrity="sha384-WBhzd+87GQqNnqPLNAn5C7FAa8F/UuNpjW2vcLo8iVyvvT3LxuGZh6xoQYPTq0Tw" crossorigin="anonymous">
|
||
<title>Buttons</title>
|
||
</head>
|
||
<body>
|
||
<a href="#content" class="skip">Skip to content</a>
|
||
|
||
<header id="head" class="text-center">
|
||
<h1>
|
||
<a href="../index.html">
|
||
<img src="../source/img/wordmark.svg" alt="Shoelace logo">
|
||
</a>
|
||
</h1>
|
||
|
||
<p class="text-secondary text-small">
|
||
A back to the basics CSS starter kit. For when you don’t need the whole boot.
|
||
</p>
|
||
</header>
|
||
|
||
<main class="container">
|
||
<div class="row">
|
||
<nav class="col-md-3">
|
||
<ul id="nav">
|
||
<li><a href="installing.html">Installing</a></li>
|
||
<li><a href="customizing.html">Customizing</a></li>
|
||
<li><a href="content.html">Content</a></li>
|
||
<li><a href="alerts.html">Alerts</a></li>
|
||
<li><a href="badges.html">Badges</a></li>
|
||
<li><a href="buttons.html">Buttons</a></li>
|
||
<li><a href="dropdowns.html">Dropdowns</a></li>
|
||
<li><a href="file-buttons.html">File Buttons</a></li>
|
||
<li><a href="forms.html">Forms</a></li>
|
||
<li><a href="grid-system.html">Grid System</a></li>
|
||
<li><a href="loaders.html">Loaders</a></li>
|
||
<li><a href="progress-bars.html">Progress Bars</a></li>
|
||
<li><a href="switches.html">Switches</a></li>
|
||
<li><a href="tabs.html">Tabs</a></li>
|
||
<li><a href="tables.html">Tables</a></li>
|
||
<li><a href="utilities.html">Utilities</a></li>
|
||
<li><a href="icons.html">Icons</a></li>
|
||
<li><a href="browser-support.html">Browser Support</a></li>
|
||
<li><a href="attribution.html">Attribution</a></li>
|
||
</ul>
|
||
</nav>
|
||
|
||
<div class="col-md-9">
|
||
<div id="content">
|
||
<h2 id="buttons">Buttons</h2>
|
||
<p>To create a button, use the <code><button></code> element or apply the <code>button</code> class to an <code><a></code>.</p>
|
||
<pre><code class="lang-html"><button type="button">Button</button>
|
||
</code></pre>
|
||
<div class="input-field">
|
||
<button type="button">Button</button>
|
||
</div>
|
||
|
||
<p>Use the <code>button-[xs|sm|lg|xl]</code> modifiers to change the size of a button.</p>
|
||
<pre><code class="lang-html"><button type="button" class="button-xs">XS Button</button>
|
||
<button type="button" class="button-sm">SM Button</button>
|
||
<button type="button">Default Button</button>
|
||
<button type="button" class="button-lg">LG Button</button>
|
||
<button type="button" class="button-xl">XL Button</button>
|
||
</code></pre>
|
||
<div class="input-field">
|
||
<button type="button" class="button-xs">XS Button</button>
|
||
<button type="button" class="button-sm">SM Button</button>
|
||
<button type="button">Default Button</button>
|
||
<button type="button" class="button-lg">LG Button</button>
|
||
<button type="button" class="button-xl">XL Button</button>
|
||
</div>
|
||
|
||
<p>To disable a button set the <code>disabled</code> property on <code><button></code> elements. You can simulate the disabled state on links by adding the <code>disabled</code> class, but additional JavaScript is required to prevent them from being activated.</p>
|
||
<pre><code class="lang-html"><button type="button" disabled>Disabled Button</button>
|
||
<a href="#" class="button disabled">Disabled Link</a>
|
||
</code></pre>
|
||
<div class="input-field">
|
||
<button type="button" disabled>Disabled Button</button>
|
||
<a href="#" class="button disabled">Disabled Link</a>
|
||
</div>
|
||
|
||
<p>You can force buttons to have an active state by applying the <code>active</code> class.</p>
|
||
<pre><code class="lang-html"><button type="button" class="active">Active Button</button>
|
||
<a href="#" class="button active">Active Link</a>
|
||
</code></pre>
|
||
<div class="input-field">
|
||
<button type="button" class="active">Active Button</button>
|
||
<a href="#" class="button active">Active Link</a>
|
||
</div>
|
||
|
||
<h3 id="variations">Variations</h3>
|
||
<p>Use the <code>button-*</code> modifier to create variations.</p>
|
||
<pre><code class="lang-html"><button type="button" class="button-secondary">Secondary</button>
|
||
<button type="button" class="button-success">Success</button>
|
||
<button type="button" class="button-info">Info</button>
|
||
<button type="button" class="button-warning">Warning</button>
|
||
<button type="button" class="button-danger">Danger</button>
|
||
<button type="button" class="button-light">Light</button>
|
||
<button type="button" class="button-dark">Dark</button>
|
||
</code></pre>
|
||
<div class="input-field">
|
||
<button type="button" class="button-secondary">Secondary</button>
|
||
<button type="button" class="button-success">Success</button>
|
||
<button type="button" class="button-info">Info</button>
|
||
<button type="button" class="button-warning">Warning</button>
|
||
<button type="button" class="button-danger">Danger</button>
|
||
<button type="button" class="button-light">Light</button>
|
||
<button type="button" class="button-dark">Dark</button>
|
||
</div>
|
||
|
||
<h3 id="block-buttons">Block Buttons</h3>
|
||
<p>Use the <code>button-block</code> modifier to make a button span the entire width of its parent.</p>
|
||
<pre><code class="lang-html"><button type="button" class="button-block">Block Button</button>
|
||
</code></pre>
|
||
<div class="input-field">
|
||
<button type="button" class="button-block">Block Button</button>
|
||
</div>
|
||
|
||
<h3 id="link-buttons">Link Buttons</h3>
|
||
<p>Buttons can be styled to look like normal links with the <code>button-link</code> modifier. Button sizing is maintained so they align properly with other buttons.</p>
|
||
<pre><code class="lang-html"><a href="#" class="button button-link">Link Button</a>
|
||
</code></pre>
|
||
<div class="input-field">
|
||
<a href="#" class="button button-link">Link Button</a>
|
||
</div>
|
||
|
||
<h3 id="loader-buttons">Loader Buttons</h3>
|
||
<p>Buttons can be given a loading state with the <code>button-loader</code> modifier. This will make the button text invisible and display a loader using the <code>::after</code> pseudo-element. The button’s width will not be affected.</p>
|
||
<pre><code class="lang-html"><button type="button" class="button-loader button-xs">Button</button>
|
||
<button type="button" class="button-loader button-sm">Button</button>
|
||
<button type="button" class="button-loader">Button</button>
|
||
<button type="button" class="button-loader button-lg">Button</button>
|
||
<button type="button" class="button-loader button-xl">Button</button>
|
||
</code></pre>
|
||
<div class="input-field">
|
||
<button type="button" class="button-loader button-xs">Button</button>
|
||
<button type="button" class="button-loader button-sm">Button</button>
|
||
<button type="button" class="button-loader">Button</button>
|
||
<button type="button" class="button-loader button-lg">Button</button>
|
||
<button type="button" class="button-loader button-xl">Button</button>
|
||
</div>
|
||
|
||
<p>Loader buttons also work with button variations.</p>
|
||
<pre><code class="lang-html"><button type="button" class="button-loader button-secondary">Button</button>
|
||
<button type="button" class="button-loader button-success">Button</button>
|
||
<button type="button" class="button-loader button-info">Button</button>
|
||
<button type="button" class="button-loader button-warning">Button</button>
|
||
<button type="button" class="button-loader button-danger">Button</button>
|
||
<button type="button" class="button-loader button-light">Button</button>
|
||
<button type="button" class="button-loader button-dark">Button</button>
|
||
</code></pre>
|
||
<div class="input-field">
|
||
<button type="button" class="button-loader button-secondary">Button</button>
|
||
<button type="button" class="button-loader button-success">Button</button>
|
||
<button type="button" class="button-loader button-info">Button</button>
|
||
<button type="button" class="button-loader button-warning">Button</button>
|
||
<button type="button" class="button-loader button-danger">Button</button>
|
||
<button type="button" class="button-loader button-light">Button</button>
|
||
<button type="button" class="button-loader button-dark">Button</button>
|
||
</div>
|
||
|
||
</div>
|
||
</div>
|
||
</main>
|
||
|
||
<footer id="foot" role="contentinfo">
|
||
<a href="../index.html">
|
||
<img src="../source/img/wordmark.svg" alt="Shoelace logo">
|
||
</a>
|
||
|
||
<p class="text-small text-secondary">
|
||
1.0.0-beta24
|
||
</p>
|
||
|
||
<p class="mar-y-sm text-center">
|
||
<a class="github-button" href="https://github.com/claviska/shoelace-css/fork" data-size="large" aria-label="Fork claviska/shoelace-css on GitHub">Fork</a>
|
||
<a class="github-button" href="https://github.com/claviska/shoelace-css/releases" data-icon="octicon-cloud-download" data-size="large" aria-label="Download claviska/shoelace-css on GitHub">Download</a>
|
||
<a class="github-button" href="https://github.com/claviska/shoelace-css/issues" data-icon="octicon-issue-opened" data-size="large" aria-label="Issue claviska/shoelace-css on GitHub">Report a Bug</a>
|
||
<a class="github-button" href="https://github.com/claviska/shoelace-css" data-icon="octicon-star" data-size="large" data-show-count="true" aria-label="Star claviska/shoelace-css on GitHub">Star</a>
|
||
</p>
|
||
|
||
<p>
|
||
<a href="https://twitter.com/shoelacecss" class="button button-info" style="margin-bottom: 1.2rem;">Follow</a>
|
||
<a href="https://paypal.me/claviska" class="button button-success" style="margin-bottom: 1.2rem;">Donate</a>
|
||
</p>
|
||
|
||
<p class="text-small text-secondary">
|
||
<a href="https://keycdn.com/" class="text-secondary">Accelerated by KeyCDN</a> ·
|
||
© A Beautiful Site, LLC
|
||
</p>
|
||
</footer>
|
||
|
||
<script src="https://cdnjs.cloudflare.com/ajax/libs/zepto/1.2.0/zepto.min.js"></script>
|
||
<script src="https://cdnjs.cloudflare.com/ajax/libs/prism/1.6.0/prism.min.js"></script>
|
||
<script src="../dist/shoelace.js"></script>
|
||
<script>
|
||
$(function() {
|
||
// Highlight current nav item
|
||
$('#nav a').each(function() {
|
||
if(this.pathname === location.pathname) {
|
||
$(this).addClass('current');
|
||
}
|
||
});
|
||
|
||
// Intercept dropdown clicks for the demo
|
||
$('.dropdown').on('select', function(event) {
|
||
event.preventDefault();
|
||
});
|
||
});
|
||
</script>
|
||
<script async defer src="https://buttons.github.io/buttons.js"></script>
|
||
</body>
|
||
</html>
|