Skip to content

Commit f222155

Browse files
committed
readme update
1 parent 0c4c8fa commit f222155

File tree

2 files changed

+10
-2
lines changed

2 files changed

+10
-2
lines changed

packages/docs/src/components/home/demo-grid.tsx

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -68,9 +68,12 @@ const demos = [
6868
];
6969

7070
export const DemoGrid: FC = () => {
71-
const [selectedDemo, setSelectedDemo] = useState(0);
71+
const [selectedDemo, setSelectedDemo] = useState(() => {
72+
const search = new URLSearchParams(document.location.search);
73+
return search.has("demo") ? parseInt(search.get("demo"), 10) : 0;
74+
});
7275
return (
73-
<div className={styles.container}>
76+
<div className={styles.container} id="demogrid">
7477
<DemoBox
7578
initialStory={demos[selectedDemo]?.story}
7679
tags={["homepage"]}

readme.MD

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,11 @@ library you want. The library automatically provides the necessary
1919
aria tags to emulate a nested tree structure, so that accessibility
2020
requirements are met despite the flat structure.
2121

22+
Dive into [the Get Started page](https://headless-tree.lukasbach.com/getstarted)
23+
to find out how to use Headless Tree, or have a look at
24+
[the samples on the Headless Tree Homepage](https://headless-tree.lukasbach.com/#demogrid)
25+
to get an idea of what you can do with it.
26+
2227
> [!TIP]
2328
> Headless Tree is now available as Beta! The library is mostly stable and
2429
> production ready, and will be generally released within two months, once

0 commit comments

Comments
 (0)