A collection of tree-shakeable Astro components
npm install exo-dsA tree-shakeable collection of Astro components published as a single npm package.
``text`
/
āāā src/
ā āāā components/
ā āāā toggle-group/
ā ā āāā ToggleGroup.astro
ā āāā tree/
ā ā āāā Tree.astro
ā āāā typography/
ā āāā Typography.astro
āāā package.json
āāā tsconfig.json
āāā README.md
`sh`
npm install exo-ds
The package is tree-shakeable, so you can import only the components you need:
`astro
---
import ToggleGroup from 'exo-ds/toggle-group';
---
`
`astro
---
import Typography from 'exo-ds/typography';
---
`
`astro
---
import Tree from 'exo-ds/tree';
---
type: "folder",
open: true,
children: [
{
name: "src",
type: "folder",
children: [
{ name: "index.ts", type: "file" },
{ name: "utils.ts", type: "file" }
]
},
{ name: "package.json", type: "file" }
]
}} />
`
| Command | Action |
| :------------ | :------------------------- |
| npm install | Install all dependencies |npm publish
| | Publish the package to npm |
To publish the package:
1. Update the version in package.json if needednpm publish
2. Run
The package uses Astro components and TypeScript. All components are located in src/components/ and can be imported individually for optimal tree-shaking.
- ToggleGroup - Toggle group component (exo-ds/toggle-group)exo-ds/typography
- Typography - Semantic HTML typography elements ()h1
- Variants: , h2, h3, h4, h5, h6, pexo-ds/tree`)
- Tree - File/folder tree structure with collapsible folders (
- Accepts JSON data structure
- Supports icons and collapsible/non-collapsible modes