Flexbox grid
Layout includes flexbox based responsive grid system with 12 columns.
Add the columns class to a container with the container class. And add any element you want with the column class inside the container. These columns will take up the space equally. You can specific the width of each column by adding class col-[1-12].
And you can add the col-gapless class to have gapless columns.
By default, Spectre grid has multi-line flexbox enabled. You can add the col-oneline class to columns to make all its child columns positioned in the same single row.
<div class="container">
<div class="columns">
<div class="column col-6">col-6</div>
<div class="column col-3">col-3</div>
<div class="column col-2">col-2</div>
<div class="column col-1">col-1</div>
</div>
<div class="columns col-gapless">
<div class="column col-6">col-6</div>
<div class="column col-6">col-6</div>
</div>
</div>
Responsive grid
Spectre provides a neat responsive layout grid system and responsive visibility utilities.
There are col-xs-[1-12], col-sm-[1-12], col-md-[1-12], col-lg-[1-12] and col-xl-[1-12] available for flexible grid across mobile, tablet and desktop viewport usage.
col-xs-[1-12]apply to window width smaller than or equal to 480px.col-sm-[1-12]apply to window width smaller than or equal to 600px.col-md-[1-12]apply to window width smaller than or equal to 840px.col-lg-[1-12]apply to window width smaller than or equal to 960px.col-xl-[1-12]apply to window width smaller than or equal to 1280px.
<div class="container">
<div class="columns">
<div class="column col-xs-6">col-xs-6</div>
<div class="column col-xs-3">col-xs-3</div>
<div class="column col-xs-3">col-xs-3</div>
</div>
</div>
Responsive container
The responsive layout also provides fixed-width containers. Use grid-xs(480px), grid-sm (600px), grid-md (840px), grid-lg (960px) or grid-xl (1280px) to container for a fixed-width container with the specific max-width.
<!-- 100% width container with max-width set to grid-lg (960px) -->
<div class="container grid-lg">
<div class="columns">
...
</div>
</div>
Responsive visibility
The responsive visibility utilities help show and hide elements on specific viewport sizes.
| size-xs | size-sm | size-md | size-lg | size-xl | |
|---|---|---|---|---|---|
| hide-xs | |||||
| hide-sm | |||||
| hide-md | |||||
| hide-lg | |||||
| hide-xl |
For hiding elements on specific viewport sizes, there are classes hide-xs, hide-sm, hide-md, hide-lg and hide-xl available.
hide-xshides elements when the window width is smaller than or equal to 480px.hide-smhides elements when the window width is smaller than or equal to 600px.hide-mdhides elements when the window width is smaller than or equal to 840px.hide-lghides elements when the window width is smaller than or equal to 960px.hide-xlhides elements when the window width is smaller than or equal to 1280px.
| size-xs | size-sm | size-md | size-lg | size-xl | |
|---|---|---|---|---|---|
| show-xs | |||||
| show-sm | |||||
| show-md | |||||
| show-lg | |||||
| show-xl |
For showing elements on specific viewport sizes, there are classes show-xs, show-sm, show-md, show-lg and show-xl available.
show-xsshows elements when the window width is smaller than or equal to 480px.show-smshows elements when the window width is smaller than or equal to 600px.show-mdshows elements when the window width is smaller than or equal to 840px.show-lgshows elements when the window width is smaller than or equal to 960px.show-xlshows elements when the window width is smaller than or equal to 1280px.
Spectre also has a responsive web test tool Responsive Resizer. You can clone the GitHub Repo to use it locally or use it online.
Panels
Panels are flexible view container layout with auto-expand content section.
Thor Odinson
Earth's Mightiest Heroes joined forces to take on threats that were too big for any one hero to tackle...
Bruce Banner
The Strategic Homeland Intervention, Enforcement, and Logistics Division...
Tony Stark
Earth's Mightiest Heroes joined forces to take on threats that were too big for any one hero to tackle...
Steve Rogers
The Strategic Homeland Intervention, Enforcement, and Logistics Division...
Natasha Romanoff
Earth's Mightiest Heroes joined forces to take on threats that were too big for any one hero to tackle...
Add a container element with the panel class. And add child elements with the panel-header, panel-nav, panel-body and/or panel-footer class. The panel-body can be auto expanded and vertically scrollable.
<div class="panel">
<div class="panel-header">
<div class="panel-title">Comments</div>
</div>
<div class="panel-nav">
<!-- navigation components: tabs, breadcrumbs or pagination -->
</div>
<div class="panel-body">
<!-- contents -->
</div>
<div class="panel-footer">
<!-- buttons or inputs -->
</div>
</div>
Empty states / blank slates
Empty states/blank slates are commonly used as placeholders for first time use, empty data and error screens.
You have no new messages
Click the button to start a conversation
You've successfully signed up
Click the button to invite your friends
You are not following anyone
Start to meet new friends
An empty state component can include icons, messages (title and subtitle messages) and action buttons or any combination of those elements. Add empty-icon, empty-title, empty-subtitle or empty-action to the elements. HTML structure is exampled below.
<div class="empty">
<div class="empty-icon">
<i class="icon icon-people"></i>
</div>
<p class="empty-title h5">You have no new messages</p>
<p class="empty-subtitle">Click the button to start a conversation.</p>
<div class="empty-action">
<button class="btn btn-primary">Send a message</button>
</div>
</div>