You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
440 lines
13 KiB
440 lines
13 KiB
<!DOCTYPE HTML>
|
|
<html>
|
|
<head>
|
|
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
|
|
<title>UI Form - Semantic</title>
|
|
|
|
<link rel="stylesheet" class="ui" href="../src/ui/flat/panel.css" type="text/css" media="screen" />
|
|
<link rel="stylesheet" class="ui" href="../src/ui/flat/button.css" type="text/css" media="screen" />
|
|
<link rel="stylesheet" class="ui" href="../src/ui/flat/text.css" type="text/css" media="screen" />
|
|
<link rel="stylesheet" class="ui" href="../src/ui/flat/form.css" type="text/css" media="screen" />
|
|
<link rel="stylesheet" class="ui" href="../src/ui/flat/divider.css" type="text/css" media="screen" />
|
|
<link rel="stylesheet" class="ui" href="../src/ui/flat/block.css" type="text/css" media="screen" />
|
|
<link rel="stylesheet" class="ui" href="../src/ui/flat/segment.css" type="text/css" media="screen" />
|
|
<link rel="stylesheet" class="ui" href="../src/ui/flat/checkbox.css" type="text/css" media="screen" />
|
|
<link rel="stylesheet" class="ui" href="../src/ui/flat/icons.css" type="text/css" media="screen" />
|
|
|
|
<link rel="stylesheet" href="../src/ui/flat/menu.css" type="text/css" media="screen" />
|
|
|
|
<link rel="stylesheet" href="../src/modules/shape.css" type="text/css" media="screen" />
|
|
|
|
<link rel="stylesheet" href="library/sidr.css" type="text/css" media="screen" />
|
|
<link rel="stylesheet" href="stylesheets/example.css" type="text/css" media="screen" />
|
|
|
|
<script src="../dependencies/jquery.js" type="text/javascript"></script>
|
|
<script src="../src/modules/ui/shape.js" type="text/javascript"></script>
|
|
<script src="../src/modules/behavior/state.js" type="text/javascript"></script>
|
|
|
|
<script src="library/sidr.js" type="text/javascript"></script>
|
|
<script src="library/waypoints.js" type="text/javascript"></script>
|
|
<script src="javascript/example.js" type="text/javascript"></script>
|
|
|
|
</head>
|
|
|
|
<body id="example">
|
|
|
|
<div class="sidr" id="menu">
|
|
<ul>
|
|
<li><a href="module.html">Introduction</a></li>
|
|
<li><a>Download</a></li>
|
|
<li><a href="#">UI</a>
|
|
<ul>
|
|
<li class="active"><a href="button.html">Button</a></li>
|
|
<li><a>Text</a></li>
|
|
<li><a>Headers</a></li>
|
|
<li><a>Columns</a></li>
|
|
<li><a>Elements (Grid System)</a></li>
|
|
<li><a>Tags</a></li>
|
|
<li><a>Items (Lists of Content)</a></li>
|
|
<li><a>Panels (Type of Menu)</a></li>
|
|
<li><a>Forms</a></li>
|
|
<li><a>Fields</a></li>
|
|
<li><a>Checkboxes</a></li>
|
|
<li><a>Icons</a></li>
|
|
<li><a>Dividers</a></li>
|
|
</ul>
|
|
</li>
|
|
<li><a href="#">UI Modules</a>
|
|
<ul>
|
|
<li><a>Accordion</a></li>
|
|
<li><a>Chat Room</a></li>
|
|
<li><a>Modal</a></li>
|
|
<li><a>Nag</a></li>
|
|
<li><a>Popup</a></li>
|
|
<li><a>Search</a></li>
|
|
<li><a>Star Rating</a></li>
|
|
<li><a>Tabs</a></li>
|
|
</ul>
|
|
</li>
|
|
<li><a href="#">Behavioral Modules</a>
|
|
<ul>
|
|
<li><a>API</a></li>
|
|
<li><a>Animation</a></li>
|
|
<li><a>Form Validation</a></li>
|
|
<li><a>Placeholder Text</a></li>
|
|
<li><a class="shape.html">Shape</a></li>
|
|
<li><a>State</a></li>
|
|
</ul>
|
|
</li>
|
|
</ul>
|
|
</div>
|
|
<div class="ui large fixed transparent black menu">
|
|
<div class="container">
|
|
<div class="title item">
|
|
Semantic UI: Form
|
|
</div>
|
|
<div class="icon previous link item">
|
|
<a href="button.html"><i class="icon left-open"></i></a>
|
|
</div>
|
|
<div class="section dropdown item">
|
|
2 of 14
|
|
<div class="menu">
|
|
<a href="button.html" class="item">1. Button</a>
|
|
<a class="active item">2. Form</a>
|
|
<a class="item">3. Headers</a>
|
|
<a class="item">4. Columns</a>
|
|
<a class="item">5. Elements</a>
|
|
<a class="item">6. Tags</a>
|
|
<a class="item">7. Items</a>
|
|
<a class="item">8. Panels</a>
|
|
</div>
|
|
</div>
|
|
<div class="icon next link item">
|
|
<i class="icon right-open"></i>
|
|
</div>
|
|
<div class="right menu">
|
|
<a class="item" href="https://github.com/quirkyinc/semantic">
|
|
<i class="icon cloud"></i>
|
|
</a>
|
|
<a class="item" href="https://github.com/quirkyinc/semantic">
|
|
<i class="icon github"></i>
|
|
</a>
|
|
<div class="dropdown item">
|
|
<i class="icon cog"></i>
|
|
<div class="menu">
|
|
<div class="swap item">Change Theme</div>
|
|
<div class="item">About Semantic</div>
|
|
<div class="item">Choice 3</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div class="ui huge left attached vertical side buttons">
|
|
<div class="ui blue menu button">Menu</div>
|
|
</div>
|
|
<div class="segment">
|
|
<div class="container">
|
|
<h1>Form</h1>
|
|
<p>Forms are a grouping of elements requiring user input.</p>
|
|
<p>
|
|
Forms always include fields, and fields always contain form elements. Fields themselves may also include:
|
|
<a href="#">standard form fields</a>, like labels, inputs and textareas, as well as:
|
|
<a href="#">checkboxes</a>,
|
|
<a href="#">sliders</a>, and
|
|
<a href="#">message blocks</a>.
|
|
</p>
|
|
<p>Validation messages are <a href="#">text blocks</a> which are formatted for use inside forms.</p>
|
|
</div>
|
|
</div>
|
|
<div class="main container">
|
|
<div class="peek">
|
|
<div class="ui large vertical pointing bottom attached panel">
|
|
<li class="active">Standard</li>
|
|
<li>States</li>
|
|
<li>Variations</li>
|
|
<li>Group</li>
|
|
</div>
|
|
</div>
|
|
<h2>Standard</h2>
|
|
|
|
<h4>Form:</h4>
|
|
<p>A form is a collection of user input elements, and has no stylings of its own.</p>
|
|
<div class="ui form segment">
|
|
<p>Let's go ahead and get you signed up.</p>
|
|
<div class="two fields">
|
|
<div class="field">
|
|
<label>First Name</label>
|
|
<input placeholder="First Name" type="text">
|
|
</div>
|
|
<div class="field">
|
|
<label>Last Name</label>
|
|
<input placeholder="Last Name" type="text">
|
|
</div>
|
|
</div>
|
|
<div class="field">
|
|
<label>Username</label>
|
|
<input placeholder="Username" type="text">
|
|
</div>
|
|
<div class="field">
|
|
<label>Password</label>
|
|
<input type="password">
|
|
</div>
|
|
<div class="inline field">
|
|
<div class="ui checkbox">
|
|
<input type="checkbox" id="terms" />
|
|
<label for="terms"></label>
|
|
</div>
|
|
<label>I agree to the terms and conditions</label>
|
|
</div>
|
|
<div class="ui blue submit button">Submit</div>
|
|
</div>
|
|
|
|
<h3>Types of Content</h3>
|
|
|
|
<h4>Field</h4>
|
|
<p>A field is a form element containing a label and an input</p>
|
|
<div class="ui form">
|
|
<div class="field">
|
|
<label>User Input</label>
|
|
<input type="text">
|
|
</div>
|
|
</div>
|
|
|
|
<h4>Text Area</h4>
|
|
<p>A textarea uses the default form element</p>
|
|
<div class="ui form">
|
|
<div class="field">
|
|
<label>User Text</label>
|
|
<textarea></textarea>
|
|
</div>
|
|
</div>
|
|
|
|
<h4>Checkbox</h4>
|
|
<p>Checkboxes are styled forms of standard form checkboxes.</p>
|
|
<div class="ui form">
|
|
<div class="field">
|
|
<label>Checkbox (Using attribute ID to trigger checked event)</label>
|
|
<div class="ui checkbox">
|
|
<input type="checkbox" id="uniqueid" />
|
|
<label for="uniqueid"></label>
|
|
</div>
|
|
</div>
|
|
<div class="field">
|
|
<label>Checkbox (<a href="#">Javascript</a>)</label>
|
|
<div class="ui checkbox">
|
|
<input type="checkbox"/>
|
|
<label></label>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<h4>Validation</h4>
|
|
<p>Text blocks have special meaning inside a form tag. All message blocks are hidden by default.</p>
|
|
<div class="ui form">
|
|
<div class="ui block">
|
|
<div class="header">We had some issues</div>
|
|
<ul class="list">
|
|
<li>Please enter your first name</li>
|
|
<li>Please enter your last name</li>
|
|
</ul>
|
|
</div>
|
|
</div>
|
|
|
|
<h2>States</h2>
|
|
|
|
<h3>Form</h3>
|
|
|
|
<h4>Loading</h4>
|
|
<p>If a form is in loading state, it will automatically show a loading indicator:</p>
|
|
|
|
<div class="ui loading form segment">
|
|
<div class="two fields">
|
|
<div class="field">
|
|
<label>First Name</label>
|
|
<input placeholder="First Name" type="text">
|
|
</div>
|
|
<div class="field">
|
|
<label>Last Name</label>
|
|
<input placeholder="Last Name" type="text">
|
|
</div>
|
|
</div>
|
|
<div class="field">
|
|
<label>Username</label>
|
|
<input placeholder="Username" type="text">
|
|
</div>
|
|
<div class="field">
|
|
<label>Password</label>
|
|
<input type="password">
|
|
</div>
|
|
<div class="inline field">
|
|
<div class="ui checkbox">
|
|
<input type="checkbox" id="terms" />
|
|
<label for="terms"></label>
|
|
</div>
|
|
<label>I agree to the terms and conditions</label>
|
|
</div>
|
|
<div class="ui blue submit button">Submit</div>
|
|
</div>
|
|
|
|
<h4>Error</h4>
|
|
<p>If form is in an error state, it will automatically show any error message blocks:</p>
|
|
<div class="ui error form segment">
|
|
<div class="ui error block">
|
|
<div class="header">Action Forbidden</div>
|
|
<p>You can only sign up for an account once with a given e-mail address.</p>
|
|
</div>
|
|
<div class="two fields">
|
|
<div class="field">
|
|
<label>First Name</label>
|
|
<input placeholder="First Name" type="text">
|
|
</div>
|
|
<div class="field">
|
|
<label>Last Name</label>
|
|
<input placeholder="Last Name" type="text">
|
|
</div>
|
|
</div>
|
|
<div class="field">
|
|
<label>Username</label>
|
|
<input placeholder="Username" type="text">
|
|
</div>
|
|
<div class="field">
|
|
<label>Password</label>
|
|
<input type="password">
|
|
</div>
|
|
<div class="inline field">
|
|
<div class="ui checkbox">
|
|
<input type="checkbox" id="terms" />
|
|
<label for="terms"></label>
|
|
</div>
|
|
<label>I agree to the terms and conditions</label>
|
|
</div>
|
|
<div class="ui blue submit button">Submit</div>
|
|
</div>
|
|
|
|
<h4>Warning</h4>
|
|
<p>If form is in warning state, it will automatically show any warning message block:</p>
|
|
|
|
<div class="ui warning form segment">
|
|
<div class="ui warning block">
|
|
<div class="header">Could you check something!</div>
|
|
<ul class="list">
|
|
<li>You forgot your <b>first name</b></li>
|
|
<li>And also your <b>last name</b></li>
|
|
</ul>
|
|
</div>
|
|
<div class="two error fields">
|
|
<div class="field">
|
|
<label>First Name</label>
|
|
<input placeholder="First Name" type="text">
|
|
</div>
|
|
<div class="field">
|
|
<label>Last Name</label>
|
|
<input placeholder="Last Name" type="text">
|
|
</div>
|
|
</div>
|
|
<div class="field">
|
|
<label>Username</label>
|
|
<input placeholder="Username" type="text">
|
|
</div>
|
|
<div class="field">
|
|
<label>Password</label>
|
|
<input type="password">
|
|
</div>
|
|
<div class="inline field">
|
|
<div class="ui checkbox">
|
|
<input type="checkbox" id="terms" />
|
|
<label for="terms"></label>
|
|
</div>
|
|
<label>I agree to the terms and conditions</label>
|
|
</div>
|
|
<div class="ui blue submit button">Submit</div>
|
|
</div>
|
|
|
|
<h3>Form Fields</h3>
|
|
|
|
<h4>Error</h4>
|
|
<p>Individual fields may contain an error state</p>
|
|
|
|
<div class="ui error form segment">
|
|
<div class="two fields">
|
|
<div class="field error">
|
|
<label>First Name</label>
|
|
<input placeholder="First Name" type="text">
|
|
</div>
|
|
<div class="field">
|
|
<label>Last Name</label>
|
|
<input placeholder="Last Name" type="text">
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<h4>Disabled</h4>
|
|
<p>Individual fields may be disabled or read only</p>
|
|
|
|
<div class="ui error form segment">
|
|
<div class="two fields">
|
|
<div class="field">
|
|
<label>First Name</label>
|
|
<input placeholder="Read Only" readonly="readonly" type="text">
|
|
</div>
|
|
<div class="disabled field">
|
|
<label>Last Name</label>
|
|
<input placeholder="Disabled" disabled="disabled" type="text">
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<h2>Variations</h2>
|
|
|
|
<h4>Size</h4>
|
|
<p>A form can also be small or large</p>
|
|
<div class="ui small form segment">
|
|
<div class="ui info block">
|
|
<div class="header">We had some issues</div>
|
|
<ul class="list">
|
|
<li>Please enter your first name</li>
|
|
<li>Please enter your last name</li>
|
|
</ul>
|
|
</div>
|
|
<div class="two fields">
|
|
<div class="field">
|
|
<label>First Name</label>
|
|
<input placeholder="First Name" type="text">
|
|
</div>
|
|
<div class="field">
|
|
<label>Last Name</label>
|
|
<input placeholder="Last Name" type="text">
|
|
</div>
|
|
</div>
|
|
<div class="ui blue submit button">Submit</div>
|
|
</div>
|
|
<br><br>
|
|
<div class="ui large form segment">
|
|
<div class="ui info block">
|
|
<div class="header">We had some issues</div>
|
|
<ul class="list">
|
|
<li>Please enter your first name</li>
|
|
<li>Please enter your last name</li>
|
|
</ul>
|
|
</div>
|
|
<div class="two fields">
|
|
<div class="field">
|
|
<label>First Name</label>
|
|
<input placeholder="First Name" type="text">
|
|
</div>
|
|
<div class="field">
|
|
<label>Last Name</label>
|
|
<input placeholder="Last Name" type="text">
|
|
</div>
|
|
</div>
|
|
<div class="ui blue submit button">Submit</div>
|
|
</div>
|
|
|
|
<h3>Fields</h3>
|
|
|
|
<h4>Inline</h4>
|
|
<p>A field can have its label next to instead of above it.</p>
|
|
<div class="ui form">
|
|
<div class="ui inline fields">
|
|
<div class="field">
|
|
<label>Last name</label>
|
|
<input type="text" placeholder="Full Name">
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
</div>
|
|
</body>
|
|
|
|
</html>
|