How do I reverse a string in JavaScript?
Copy
Edit
Reusable UI building blocks of this dashboard, section by section.
components/common/Button.astro
Button or link with variant (primary, ghost, outline) and size (md, icon). Passing href renders an anchor.
components/common/Badge.astro
Small status pill. Variants: neutral, accent, outline.
components/common/Avatar.astro
Initials or image avatar in sm, md and lg sizes; circle makes it round.
components/common/Icon.astro
Mask-based SVG icons that inherit currentColor. Use <Icon name="…" size={20} />.
components/common/Spinner.astro
Loading indicator in sm, md and lg.
components/common/Shimmer.astro · styles/global.css (@utility shimmer)
Text with a sweeping highlight for loading or generating states. The highlight comes from currentColor, so it follows the text colour and theme. Use the component, or the utilities directly: shimmer, shimmer-duration-<ms>, shimmer-spread-<n>, shimmer-angle-<deg>, shimmer-color-<color>, shimmer-reverse, shimmer-once, shimmer-none.
Generating response…
Thinking…
Fast · 900ms
Slow · 4000ms
Tilted 45°
Wide highlight
Accent highlight
Pink highlight
Sweeping the other way
Plays a single sweep (reload to replay)
components/common/Tooltip.astro
CSS-only tooltip on hover or keyboard focus. Twelve positions; hover the buttons.
components/common/Dropdown.astro
Headless menu with a trigger slot; it flips to stay inside the viewport and follows text direction.
components/common/Tabs.astro
Accessible tab group with pill and underline variants. Panels are slotted by id.
components/common/Modal.astro
Dialog shell opened by any element with data-modal-open="<id>".
styles/components.css · .sidebar-button
Navigation row used in the sidebar, with default and active states.
components/chat/UserMessage.astro · AssistantMessage.astro
Chat bubbles for both roles, including the hover action row.
components/chat/CodeBlock.astro
Code snippet with a language label, copy actions and a scrollable body.
const reverse = (s) => [...s].reverse().join('');
console.log(reverse('hello'));
components/chat/ChatInput.astro
Composer with auto-growing textarea, attachments, mic and voice buttons. noSend keeps it display-only.
components/plugins/PluginCard.astro
Logo, name and description with an add or options action.