A collection of headless components and utilities for Astro. Pagination, Breadcrumb, Themes, Copy buttons, and more!
npm install astro-headless-ui: CSS javascript detector (@predaytor)
: Animates a spritesheet as a background image on an element using css
Animated icon switcher, used to display current theme, copy button state, and more using icons
: Display a ratio using elements, useful for star ratings on products, posts, etc
: Active link component, used in to generate link navigations
: Generate a list of links using props, useful for config files
: Generates a table of contents
: Site/URL hierarchy navigation
: Page navigation for paginated routes
: SSR component version of Astro's SSG paginate()
: Conditionally wrap a component
: acts like a conditional/ternary statement, mostly used for
: Advanced conditional rendering, similar to SolidJS with extra features using slots
: .map() in component form with extra features, similar to SolidJS
: Dark theme toggle button/script
: Multi theme toggle button(s)/script
: Attaches a button that copies code to all selected codeblocks
: Access scroll position of window or element inside CSS as custom properties
: Access mouse position of window or element inside CSS as custom properties
astro-headless-ui/util
hashId(): Create a hash from a string, for scoping CSS, HTML elements, and tags