![require(esm) Backported to Node.js 20, Paving the Way for ESM-Only Packages](https://cdn.sanity.io/images/cgdhsj6q/production/be8ab80c8efa5907bc341c6fefe9aa20d239d890-1600x1097.png?w=400&fit=max&auto=format)
Security News
require(esm) Backported to Node.js 20, Paving the Way for ESM-Only Packages
require(esm) backported to Node.js 20, easing the transition to ESM-only packages and reducing complexity for developers as Node 18 nears end-of-life.
elements-ui
Advanced tools
> This project is in an early stage and lacks a complete documentation. A robust demo, docs site, and example projects are in development and expected to be completed in March 2020.
This project is in an early stage and lacks a complete documentation. A robust demo, docs site, and example projects are in development and expected to be completed in March 2020.
If you arrived here from the Gatsby Theme Store, Gatsby Theme Elements v1.0.7 is still available for download, but it will be deprecated with the next stable release of Elements UI.
Build React apps with a responsive layout system powered by Theme UI.
Elements UI helps you design accessible, responsive page templates that can be customized in an infinite number of ways. Use Elements to quickly deploy a polished site layout so you can focus on developing great content or adding new integrations to your site.
Elements UI extends all of Theme UI's core features so you can easily migrate your existing theme.
sx
prop supportnpm i elements-ui
Elements UI uses two configuration objects and optional custom components to build your layouts. Your custom theme and options configurations determine how each layout should behave and appear.
See the documentation on how to build a theme and configure your layout options.
To get a site up and running in less than 5 minutes, you can use the Template
component. Simply import and supply your theme object, options object, menu array, and logo as props:
// basic template usage
import React from 'react'
import { Template } from 'elements-ui'
import theme from './my-theme'
import options from './my-options'
import menu from './my-menu'
import Logo from './Logo'
export default props => (
<Template theme={theme} options={options} menu={menu} logo={<Logo />}>
{props.children}
</Template>
)
The Template
component accepts a variety of props for custom components like a sidebar, side nav, header widgets (ie. search or social media links), footer content, and much more. Check out the Template docs for details.
If your design requires a bit more customization or if you need conditional layouts depending on a page route or variable, you can build with Elements UI's layout components:
// basic layout component usage
import React from 'react'
import {
Layout,
Header,
Navbar,
MobileMenu,
Content,
Main,
Sidebar,
Footer,
} from 'elements-ui'
import theme from './my-theme'
import options from './my-options'
import menu from './my-menu'
import Logo from './Logo'
export default props => (
<Layout theme={theme} options={options}>
<Header>
<Navbar logo={<Logo />} menu={menu} />
<MobileMenu menu={menu} />
</Header>
<Content>
<Main>{props.children}</Main>
<Sidebar>Your custom sidebar component</Sidebar>
</Content>
<Footer>Your custom footer</Footer>
</Layout>
)
All layout components can be styled with custom variants and the sx
prop.
Note: this is just an outline for planning purposes
The MIT License (MIT)
FAQs
> This project is in an early stage and lacks a complete documentation. A robust demo, docs site, and example projects are in development and expected to be completed in March 2020.
The npm package elements-ui receives a total of 3 weekly downloads. As such, elements-ui popularity was classified as not popular.
We found that elements-ui demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
require(esm) backported to Node.js 20, easing the transition to ESM-only packages and reducing complexity for developers as Node 18 nears end-of-life.
Security News
PyPI now supports iOS and Android wheels, making it easier for Python developers to distribute mobile packages.
Security News
Create React App is officially deprecated due to React 19 issues and lack of maintenance—developers should switch to Vite or other modern alternatives.