Add a container element with the form-autocomplete class. There are 2 parts of it, one is form-autocomplete-input, another is menu component. You may add the is-focused class to form-autocomplete-input to make it appear as focus state.
Spectre.css does NOT include JavaScript code, you will need to implement your JS to interact with the autocomplete. The autocomplete HTML structure is exampled below.
Add the avatar class to <img> element. There are 4 additional sizes available, including avatar-xl (64px), avatar-lg (48px), avatar-sm (24px), and avatar-xs (16px). By default, the avatar size is 32px.
For users who don't have profile pictures, you may use their initials for avatars. Add the avatar class and avatar size class to <div> element. The data-initial attribute is the name appear inside the avatar.
<!-- Basic avatar examples -->
<figureclass="avatar avatar-xl">
<imgsrc="img/avatar-1.png"alt="..." />
</figure>
<figureclass="avatar avatar-xl">
<imgsrc="img/avatar-1.png"alt="..." />
<imgsrc="img/avatar-5.png"class="avatar-icon"alt="..." />
</figure>
<figureclass="avatar avatar-xl"data-initial="YZ"style="background-color: #5764c6;"></figure>
<!-- Show initals when avatar image is unavailable or not fully loaded -->
<figureclass="avatar avatar-xl"data-initial="YZ"style="background-color: #5764c6;">
<imgsrc="img/avatar-1.png"alt="..." />
</figure>
Badges are often used as unread number indicators.
Notifications
Notifications
Notifications
Notifications
Add the badge class to non self closing elements. And add the data-badge attribute to define the content of a badge. The badge will appear in the top-right direction of the element.
If there is no data-badge or the attribute is not specified, the badge will appear as a dot.
Badges support button and avatars elements as well.
Bars represent the progress of a task or the value within the known range. Bars are custom components for displaying HTML5 progress, meter and input range elements.
25%
15%
10%
15%
Add a container element with the bar class. And add child elements with the bar-item class. The width percentage value is needed for every bar-item.
There is the bar-sm class for thinner Bars. Also, you could use Tooltips for any bar-item.
You can add the bar-slider class to the Bars container. And add child elements with the bar-item class and bar-slider-btn inside bar-item. You need to set the bar-item width manually to have the slider point.
If there are two bar-item divs in one bar-slider, you will have a range slider.
Empower every person and every organization on the planet to achieve more.
Apple
Hardware and software
To make a contribution to the world by making tools for the mind that advance humankind.
Google
Software and hardware
Organize the world’s information and make it universally accessible and useful.
Surface Studio. Turn your desk into a Studio. Surface Studio is designed for the creative process.
Apple
Hardware and software
To make a contribution to the world by making tools for the mind that advance humankind.
Google I/O
Software and hardware
An immersive, three-day experience focused on exploring the next generation of technology, mobile and beyond.
Add a container element with the card class. And add child elements with the card-image, card-header, card-body and/or card-footer classes. The card-image can be placed in any position.
<divclass="card">
<divclass="card-image">
<imgsrc="img/osx-el-capitan.jpg"class="img-responsive" />
</div>
<divclass="card-header">
<h4class="card-title">Microsoft</h4>
<h6class="card-subtitle">Software and hardware</h6>
</div>
<divclass="card-body">
Empower every person and every organization on the planet to achieve more.
</div>
<divclass="card-footer">
<buttonclass="btn btn-primary">Do</button>
</div>
</div>
Add a container element with the menu class. And add child elements with the menu-item class. You can separate menu items with a divider or menu-header. Spectre.css does not include JavaScript code, you will need to implement your JS to interact with the menus.
<ulclass="menu">
<!-- menu header text -->
<liclass="divider"data-content="LINKS">
</li>
<!-- menu item -->
<liclass="menu-item">
<ahref="#">
<iclass="icon icon-link"></i> Slack
</a>
</li>
<!-- menu divider -->
<liclass="divider"></li>
<!-- menu item with badge -->
<liclass="menu-item">
<divclass="menu-badge">
<labelclass="label label-primary">2</label>
</div>
<ahref="#">
<iclass="icon icon-link"></i> Settings
</a>
</li>
</ul>
Dropdown menus component is built entirely in CSS. It is triggered by :focus event.
Add a container element with the dropdown class. And add a focusable element with the dropdown-toggle class for the button and a menu component right next to it. You also need to add tabindex to make the buttons focusable. If the dropdown is close to the right edge of the browser, you can add the dropdown-right class to the container to prevent it appearing off screen.
Also, you can implement your JS to interact with the dropdown menus by adding the active class to the dropdown.
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Praesent risus leo, dictum in vehicula sit amet, feugiat tempus tellus. Duis quis sodales risus. Etiam euismod ornare consequat.
Climb leg rub face on everything give attitude nap all day for under the bed. Chase mice attack feet but rub face on everything hopped up on goofballs.
Efficiently unleash cross-media information without cross-media value. Quickly maximize timely deliverables for real-time schemas. Dramatically maintain clicks-and-mortar.
Caerphilly swiss fromage frais. Brie cheese and wine fromage frais chalk and cheese danish fontina smelly cheese who moved my cheese cow.
Add a container element with the modal class. And add a real container modal-container and overlay modal-overlay inside it. You can add child elements with the modal-header, modal-content and modal-footer - any or all of them.
Spectre.css does not include JavaScript code, you will need to implement your JS to interact with modals. To make a modal appear, add the active class to the modal container.
Add a container element with the pagination class. And add child elements with the page-item class. The page-item with the active class will be highlighted.
To make a contribution to the world by making tools for the mind that advance humankind.
Wrap an element by a container with the popover class. And add a container with the popover-container next to the element. You can use Cards component inside the popover-container.
Also, you can add the popover-right, popover-bottom or popover-left class to define the position. By default, the popovers appear above the element.
Add a container element with the step class. And add child elements with the step-item class. The step-item with the active class will be highlighted and indicate the current state of progress.
Add a container element with the tab class. And add child elements with the tab-item class. You can add the tab-block class for a full-width tab. The tab-item or its child <a> with the active class will be highlighted.
Tiles are repeatable or embeddable information blocks.
The Avengers
Earth's Mightiest Heroes joined forces to take on threats that were too big for any one hero to tackle...
The S.H.I.E.L.D.
The Strategic Homeland Intervention, Enforcement, and Logistics Division...
Add a container with the tile class. And add child elements with the tile-icon, tile-content or/and tile-action classes. The tile-icon and tile-action are optional.
There are tile-title and tile-subtitle classes for title and subtitle text styles.
<divclass="tile">
<divclass="tile-icon">
<divclass="example-tile-icon">
<iclass="icon icon-file centered"></i>
</div>
</div>
<divclass="tile-content">
<pclass="tile-title">The Avengers</p>
<pclass="tile-subtitle">Earth's Mightiest Heroes joined forces to take on threats that were too big for any one hero to tackle...</p>
</div>
<divclass="tile-action">
<buttonclass="btn btn-primary">Join</button>
</div>
</div>
Compact tiles
There is compact version of Tiles component, which is often used as contact and file info blocks.
Add the tile-centered class to the container tile. The tile-icon, tile-content and tile-action will be vertically centered.
Toasts are used to show alert or information to users.
Lorem ipsum dolor sit amet, consectetur adipiscing elit.
Lorem ipsum dolor sit amet, consectetur adipiscing elit.
Add a container element with the toast class. You can add any text within the container, and even icons. You may also add a close button with the btn-clear class if you need.
Toast success
Toast warning
Toast error
And you can add the toast-primary, toast-success, toast-warning or toast-error class for additional toast colors.
<divclass="toast">
Lorem ipsum dolor sit amet, consectetur adipiscing elit.
</div>
<divclass="toast toast-primary">
<buttonclass="btn btn-clear float-right"></button>
Lorem ipsum dolor sit amet, consectetur adipiscing elit.
</div>
Tooltips provide context information labels that appear on hover and focus.
Tooltips component is built entirely in CSS.
Add the tooltip class and the data-tooltip attribute, which contains the tooltip content, to non self closing elements. And add the tooltip-right, tooltip-bottom or tooltip-left class to define the position of a tooltip. By default, the tooltip appears above the element.
<buttonclass="btn tooltip"data-tooltip="Lorem ipsum dolor sit amet">top tooltip</button>
<buttonclass="btn tooltip tooltip-right"data-tooltip="Lorem ipsum dolor sit amet">right tooltip</button>