https://niui.dev niui Get started Grid Navigation Typography Aspect ratio Carousel Tabs Lightbox Tables Accordion Tooltip Modal Buttons Lists Forms Masonry Cards Fixed background Parallax scrolling Notification bar Copy to clipboard Dynamic components WordPress theme Theme Native Internet User Interface 3.0 Lightweight, featureful front end for the web GitHub repo * niui.min.css * niui.min.js * Lightweight * ES module * Accessible * Feature-packed * Dozens of demo pages * Progressive enhancement * WordPress theme * No dependencies * Style agnostic * Prefixed BEM CSS classes * Nestable components * Dynamic init * RTL ready * Unbreakable Reimplemented real world examples Oslo To Make a Film Postbank CNN Travel Hasselblad Chinese Rado.bg Tutsplus Enoden Nikon D850 VI.nl Loco2 Apex Pixel Pioneers Truphone Seehotel Jagerwirt Uncharted: The Lost Legacy David Bowie Is (Japan) Norwegian Star Wars Stripe Amnesty Tesla Brand Union Apple Vitsoe Daring Fireball Google Design GOV.UK Airbnb Mapbox SWISS MUBI Mitsubishi Regional Jet JetBlue Seat 61 Pebble Imperial Innovations Microsoft Developed by Radoslav Sharapanov since 2014. Contribute at OpenCollective or buy me a beer at Revolut or PayPal. Usage Get niui.min.css niui.min.js and index.html and edit the latter. Or install with NPM and include the niui files npm i --save-dev niui-npm or import nui from './node_modules/niui-npm/js/niui.js'; To costomise the bundle, remove anything unnecessary from components/ and run npm i --legacy-peer-deps ./build.sh Page structure Minimal
Content
Recommended
Header
Content
Options * .n-viewport - full viewport height section * Use .n-section containers in
to clear inner vertical margins * body.n-sticky-footer for a sticky footer and vertical space taken by
. * html.n-vertical-page blocks horizontal overflow. Grid Columns with classes like _1/3 inside a container of class n-row _1/5 _4/5 _1/4 _3/4 _1/3 _2/3 _2/5 _3/5 _1/2 _1/2 _1/1
...
...
Alignment Left Top Center Top Right Top Left Middle Left Bottom Center Middle Right Middle Center Bottom Right Bottom ThisLineIsTooLongAndMustBeClippedByTheContainerEvenThoughOverflowXandYDontWorkAsExpected
Left Top


Center Top
Right Top
Left Middle
Left Bottom
Center Middle
Right Middle
Center Bottom
Right Bottom
ThisLineIsTooLongAndMustBeClippedByTheContainerEvenThoughOverflowXandYDontWorkAsExpected
Grid without column padding Bottom-aligned 1/2 wide column Right-aligned 1/2 wide column. Top part of a vertical row in a normal column. Bottom part of a vertical row.
...
Grid without column margin (gutter) Bottom-aligned 1/2 wide column Right-aligned 1/2 wide column. Top part of a vertical row in a normal column. Bottom part of a vertical row.
...
Grid without spacing 1 2 3
...
Embedded grid Child grid column Child grid column Parent grid column
Child grid column
Child grid column
Parent grid column
Embedded grid without extra spacing Child grid column Child grid column Parent grid column
Child grid column
Child grid column
Parent grid column
Grid with borders Grid with borders Middle Full width
...
Grid with all borders Middle Full width Top Center Bottom Right Right
...
Right to left layout Bottom-aligned 1/2 wide column Right-aligned 1/2 wide column. Top part of a vertical row in a normal column. Bottom part of a vertical row. 1/5 centered 1/5 ThisLineIsTooLongAndMustBeClippedByTheContainerEvenThoughOverflowXandYDontWorkAsExpected 1/5 1/5
...
Options * Column class is optional. Minimum width 20%. * .n-row > div > .n-row--vertical.n-row - a vertical row as tall as the parent row with equal-height full-width children. * By default, all images inside a grid are limited to 100% width. * A column with .n-full-mobile-width will take the full mobile width. Navigation Standard * Buttons * Drop-down nav * Lightbox * Buttons * Drop-down nav * Lightbox * Accordion * Modal Big * Grid * Carousel * Form Vertical * Grid * Carousel * Form Vertical wide * Grid * Carousel * Form Scroll * Buttons * Drop-down nav * Lightbox * Accordion * Modal * Video * Aspect ratio * Masonry * Tables * Tabs * Lists * Cards * WordPress theme * Showcase Drop * [ ] + [ ] o First item's second level item 1 third level item 1 o First item's second level item 1 third level item 2 First item's second level item 1 + [ ] o First item's second level item 2 third level item 1 o First item's second level item 2 third level item 1 First item's second level item 2 First item * [ ] + [ ] o Second item level two item 1 third level item 1 o Second item level two item 1 third level item 1 Second item level two item 1 Second item which is a link with long text * [ ] + Third item second level item 1 + Third item second level item 2 Third item with one sub level * [ ] + Fourth item second level item 1 + Fourth item second level item 2 Fourth item with one sub level * Last item without a sub level * [ ] + [ ] o First item's second level item 1 third level item 1 o First item's second level item 1 third level item 2 First item's second level item 1 + [ ] o First item's second level item 2 third level item 1 o First item's second level item 2 third level item 1 First item's second level item 2 First item (reprise) Drop (right-to-left) * [ ] + [ ] o mwrd wl sTH dwm 1 mwrd sTH swm 1 o mwrd dwm sTH wl 1 mwrd sTH swm 2 mwrd wl sTH dwm 1 + [ ] o mwrd wl sTH dwm 2 mwrd sTH swm 1 o mwrd wl sTH dwm 2 mwrd sTH swm 1 mwrd dwm sTH dwm 2 mwrd wl * [ ] + [ ] o mwrd dwm sTH dw mwrd 1 mwrd sTH swm 1 o mwrd dwm sTH dw mwrd 1 mwrd sTH swm 1 mwrd dwm sTH dw mwrd 1 mwrd dwm khh pywndy b mtn Twlny st * [ ] + mwrd swm sTH dwm 1 + mwrd swm mwrd dwm sTH 2 mwrd swm b ykh sTH fr`y * [ ] + mwrd chhrm mwrd sTH dwm 1 + mwrd chhrm mwrd dwm sTH 2 mwrd chhrm b ykh sTH fr`y * mwrd akhr bdwn sTH zyr * [ ] + [ ] o mwrd wl sTH dwm 1 mwrd sTH swm 1 o mwrd dwm sTH wl 1 mwrd sTH swm 2 mwrd wl mwrd sTH dwm 11 + [ ] o mwrd wl sTH dwm 2 mwrd sTH swm 1 o mwrd wl sTH dwm 2 mwrd sTH swm 1 mwrd dwm sTH dwm 2 mwrd wl (tkhrr) Rich select A rich select with links instead of buttons Go to page... Home Forms
Home Forms
Typography For niui typography features like baseline alignment, wrap the below elements inside an .n-type container. Headlines Headline 1 Headline 2 Headline 3 Headline 4 Headline 5 Headline 6 Headlines use padding instead of margin, to take up vertical space divisible by page line height. Quote `The sky above the port was the color of television, tuned to a dead channel.' ... Drop cap Call me Ishmael. Some years ago - never mind how long precisely - having little or no money in my purse, and nothing particular to interest me on shore, I thought I would sail about a little and see the watery part of the world.

...

Links Here is a first link. Paragraph Text elements are baseline-aligned with height divisible by the default line height. Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Height compensation according to line height Portrait ... To avoid shifting on page load, add niui-preload.min.js in . Aspect ratio container As the image is loading, the layout is already solid and the page doesn't jump after the download. Lido Lido Options * If the element has inline style --ratio, the --width/--height combination is ignored. * The container can be a div and the content doesn't need to be an image. Carousel Full info on standalone component home page. Standard One Two Previous Next Index One Two Previous Next 1 2 Vertical One Two Previous Next 1 2 Vertical with controls on the right One Two Previous Next 1 2 Controls outside of content One Two Previous Next 1 2 Peeking at neighboring slides One Two Previous Next 1 2 Auto height One Two Previous Next Carousel with detached nav Carousel here... One Two ...detached nav here Previous Next 1 2 Options * Custom slide duration Optional section
Enable fieldset below
...
Optional fieldsets are ignored by validation when disabled. Options * .n-form__condition 's optional fieldset is selected either by a data-for/id match or as a following sibling. * Validation enabled by