Editorial components
for Tailwind CSS v4.
Components for Tailwind CSS v4 with monospaced typography, thin borders instead of shadows and a color system you change with a single variable.
Press ⌘K to search for any component or class.
In 30 seconds
Import Cobalto after Tailwind and use the cb-* classes in your HTML.
@import "tailwindcss";
@import "cobalto/tailwind";
<a class="cb-btn cb-btn--primary" href="#">Empezar ↗</a>
Principles
- 01
Tokens first
No component uses fixed colors. Everything goes through
--cb-*variables. - 02
Your utilities win
Components live in
@layer components, somt-0orbg-cb-bg-2always override them. - 03
Optional JS
data-cb-*attributes, no dependencies, compatible with Livewire and Alpine.
Components
Structure
Announcement bar
Top strip for statuses, short notices or contact information. It goes before the navbar.
Navbar
Fixed bar with logo, menu with submenus (hover and click), search, theme toggle and call to action.
Mobile menu
Full-screen menu that slides in from the right below the navbar. It closes when a link is chosen, with Esc, or when switching to desktop.
Hero
Cover section with numbered label, large headline, text, actions, note and chips. The background grid is optional.
Section header
Numbered label, h2 title and paragraph. It's the piece that gives each section its editorial rhythm.
Footer
Footer with link columns, giant decorative text and a bottom row.
Documentation sidebar
Side navigation with groups, active link, version selector and a table of contents that follows the scroll.
Dashboard layout
Fixed sidebar, topbar and content area. On mobile the sidebar becomes a side panel.
Content
Card
Flat card with a visual, status label, text, meta and an arrow that appears on hover.
Card grid
Grid with shared borders: the container draws the top and left, and each cell draws the right and bottom.
Principles list
Numbered list in three columns with a top line. Useful for values, features or steps.
Stats
Large figures with a label, in a box with 1px dividers.
CTA
Centered call-to-action block to close a page.
Pricing
Price cards with a featured plan, feature list and a toggle between monthly and yearly billing.
Testimonials
Quotes with author, role and avatar. Combine them with cb-grid to show several.
Timeline and changelog
Timeline with the date on the left. On mobile the date sits above each entry.
Empty state
Empty state with icon, text and actions for when a list or search has no results.
Code block
Code with a header, a copy button and syntax colors that follow the theme.
Actions and labels
Buttons
Four main variants, three sizes, icons, and disabled and loading states.
Chips and tags
Chips with a color swatch for filters or technologies, status tags and the kbd key.
Badge and avatar
Counters, status dots and avatars with initials or an image, alone or in a group.
Dropdown
Generic dropdown menu with keyboard navigation, shortcuts, dividers and destructive actions.
Breadcrumb
Navigation path with separators.
Pagination
Page buttons with previous, next and ellipsis.
Forms and data
Forms
Input, textarea, select, checkbox, radio, switch and file, with help text and error and success states.
Data table
Table with column sorting, search, filter, pagination and row selection. Without JS it looks like a normal table.
Overlays
Modal
Centered dialog with trapped focus, closing with Esc, backdrop click and data-cb-close buttons.
Drawer
Side panel (right, left or bottom) with the same behavior as the modal.
Command palette
⌘K search with groups, arrow key navigation and accent-insensitive matching. It is the same one this documentation uses.
Tooltip and popover
Text tooltip on hover and focus, and popover with interactive content that opens on click.
Interaction and state
Tabs
Tabs with arrow, Home and End key navigation. Two styles: line and pills.
Accordion / FAQ
Based on details and summary: works without JS. The JS adds single-open mode and events.
Toast
Temporary notifications with the cobalto.toast() API. They pause on hover or focus.
Alert and banner
Inline messages with four tones and full-width banners. They can be dismissed and remembered.
Progress bar
Determinate or indeterminate progress bar, with label and value.
Skeleton and spinner
Loading placeholders and a spinner that takes the text or accent color.
Stepper
Steps of a process, horizontal or vertical. On mobile the horizontal one stacks.