The prose component automatically styles HTML elements within articles, blogs, and documentation.
It provides readable typography while maintaining heading hierarchy.
Heading H1
Heading H2
Heading H3
This is a content-focused library. Bold text, italic,
highlighted, deleted, inserted.
Keyboard shortcuts: Ctrl + C to copy.
Minimalism â poverty. It's focusing on what matters.
npm i litura
First list item
Second list item
HTML
<article class="prose">
<h1>Header H1</h1>
<h2>Header H2</h2>
<h3>Header H3</h3>
<p>This is a content-focused library. <strong>Bold text</strong>, <em>italic</em>,
<mark>highlighted</mark>, <del>deleted</del>, <ins>inserted</ins>.</p>
<p>Keyboard shortcuts: <kbd>Ctrl</kbd> + <kbd>C</kbd> to copy.</p>
<blockquote>Minimalism â poverty. It's focusing on what matters.</blockquote>
<pre><code>npm i litura</code></pre>
<ul>
<li>First list item</li>
<li>Second list item</li>
</ul>
</article>
CSS Classes
.prose
Main prose component class - applies typographic styles to
all HTML elements inside
Buttons
Button system with three main variants. Uses CSS custom properties for consistent styling
across all color schemes.
Optional - component works fully without JavaScript. File
js/menu-enhancement.js adds:
Click-outside-to-close - close menu on outside click
Smart positioning - automatyczne pozycjonowanie w viewport
Keyboard navigation - arrow keys support
Focus management - focus management
To disable: remove or comment out line
<script src="./js/menu-enhancement.js">
CSS Classes
.menu
Main menu container (details element)
.menu__trigger
Trigger opening menu (summary element)
.menu__content
Container for menu elements - absolutely positioned with shadow
.menu__item
Container for single menu element (wrapper)
.menu__link
Actual menu element - link or button with hover states
.menu__separator
Separator between groups of elements (hr)
.menu__arrow
Arrow icon in menu trigger - rotates on open
.menu__item--has-submenu
Menu element containing submenu
.menu__label
Section label in menu
.menu__icon
Icon next to menu element
.menu__shortcut
Keyboard shortcut next to menu element
.menu--right
Menu dropdown to right (instead of left)
.menu--up
Menu dropdown up (instead of down)
.menu--dense
Compact version with smaller paddings
.menu--large
Larger version with bigger paddings and text
.menu--enhanced
Class added by JavaScript for better shadows
.menu__item--checkable
Element menu z checkboxem (dodaj --checked dla zaznaczenia)
.menu__item--checked
Checked checkable element (requires .menu__check inside)
Dialogs
Modal dialogs with backdrop overlay. CSS-only implementation using details/summary with optional
JavaScript enhancement for focus management and ESC key support.
Open dialog
Dialog Title
This is dialog content. You can put any HTML content here.
Dialog has a backdrop that can be clicked to close (with JavaScript enhancement).
Main dialog content container - centered on screen
.dialog__header
Dialog header with title and close button
.dialog__title
Dialog title
.dialog__close
Dialog close button (Ã)
.dialog__body
Main dialog content
.dialog__footer
Dialog footer with action buttons
.dialog--small
Smaller dialog (max-width: 20rem)
.dialog--large
Larger dialog (max-width: 48rem)
.dialog--fullscreen
Full screen dialog on mobile
Alerts
Notification system with 4 types (info, success, warning, error) and solid variants.
Supports positioning in different parts of the screen and auto-dismiss with JavaScript.
To disable: remove line
<script src="./js/dialog-alert-enhancement.js">
CSS Classes
.alert
Basic alert class - info type by default
.alert--info
Informational alert (blue)
.alert--success
Success alert (green)
.alert--warning
Warning alert (orange)
.alert--error
Error alert (red)
.alert--*-solid
Solid variants with full background in alert color
.alert__icon
Container for alert icon
.alert__content
Main alert content
.alert__title
Alert title (optional)
.alert__message
Alert message content
.alert__close
Alert close button
.alert--small
Smaller version of alert
.alert--large
Larger version of alert
.alert-container--*
Position containers: top-right, top-left, bottom-right,
bottom-left, top-center, bottom-center
Forms
Comprehensive form system with smart validation, custom controls and full accessibility.
Supports all input types, checkboxes, radio, switch, range and file upload.
Basic Fields
Input, textarea, select with smart validation and styling.