Card title
Card content goes here.
BEM / VERTICAL RHYTHM / CASCADE LAYERS
Linea UI is a small SCSS and JS library built on BEM and vertical rhythm principles. Intuitive class names, accessible defaults and a light footprint.
Saved. ln-alert ln-alert--success
Every block above sits on the same regular line. Sizes and gaps come in consistent steps, three to a line. Toggle the baseline to draw that grid over the panel.
01 / Principles
Every decision in Linea UI traces back to one of these. Each one is a SASS variable or a single layer away from your own rules.
.ln-*Each component ships the styles it needs and nothing more. Fewer decisions to undo when your design takes over.
__elementBEM class names describe what an element is and keep every rule scoped to its block. No selector reaches into another component, so styles never collide.
<h1> <p> <table>Link one stylesheet and write semantic HTML. Headings, lists and tables look right before you add a single class.
:focus-visibleContrast-checked tokens, visible focus states and scripts that respect keyboard users and reduced motion settings.
@useImport modules one by one through SASS @use. The JS layer is optional and adds behavior only where markup asks for it.
8px / 24pxText follows a vertical rhythm: every size and space snap to a grid, and lines flow on a stable baseline. The eye moves down the page at a steady pace.
@md @lgLayouts, headings and utilities adapt through breakpoint suffixes like @md and @lg. The rhythm holds at every screen size.
light-dark()Built on what browsers already support: cascade layers, custom properties and light-dark(). No vendor prefixes, polyfills or workarounds to carry around.
02 / Markup playground
Block, element, modifier. Every block and its internal components follow a standard naming pattern, so the markup alone tells you what each part is and which block its styles belong to. If you know BEM, you already know how to use Linea UI.
<article class="ln-card">
<h3 class="ln-card__title h2">Card title</h3>
<div class="ln-card__body">
<p>Card content goes here.</p>
</div>
<div class="ln-card__actions">
<a class="ln-button ln-button--primary" href="#">
Action
</a>
</div>
</article>Card content goes here.
03 / Rhythm
Type sizes, margins and component heights resolve to multiples of one base unit. Line heights step in regular increments, so every block starts where the grid expects it.
Install the package, link the stylesheet and start writing semantic HTML. Reach for the JS modules only when a component needs them.