react-lists
v1.0.0
Published
Typed React list components: <Ul>, <Ol>, <Li>, <Dl>, <Dt>, <Dd>. Compatible with React 18 and 19.
Maintainers
Readme
react-lists
Typed React list components: <Ul>, <Ol>, <Li>, <Dl>, <Dt>, <Dd>.
Works with React 18 and React 19 (types are provided by your app).
Install
pnpm add react-lists # or npm i / yarn addPeer deps:
reactand (optionally)react-dom>=18 <20
Usage
import { Ul, Ol, Li, Dl, Dt, Dd } from 'react-lists';
export default function App() {
return (
<div>
<Ul>
<Li>Milk</Li>
<Li important>Eggs</Li>
</Ul>
<Ol>
<Li>First</Li>
<Li>Second</Li>
</Ol>
<Dl>
<Dt>Coffee</Dt>
<Dd>Liquid motivation</Dd>
</Dl>
</div>
);
}Why both React 18 & 19?
- The package does not ship React types; it relies on your project’s installed React version.
- For React 18: you likely have
@types/reactinstalled. - For React 19: types ship with React; no
@types/*needed. - We avoid pinning to either to prevent type conflicts.
Development
To run the example locally:
cd example
npm install
npm run devLicense
MIT
