Oxbow UI
repository·main·Indexed 42 days ago
https://github.com/michael-andreuzza/oxbowAn open-source collection of UI blocks and content for modern product sites. It provides a library of Astro components, a CLI (`oxbowui`) for installing blocks into Astro projects, and a Model Context Protocol (MCP) server (`oxbowui-mcp`) for AI-driven component management and integration with tools like Cursor.
What's inside Oxbow UI
- Oxbow UI is open source and free to use. All blocks and content available on the website are provided under the MIT License.
Configure oxbowui-mcp for Cursor
mainTo use the Oxbow UI blocks within Cursor, create a
.cursor/mcp.jsonfile in your project root and add theoxbowserver configuration usingnpx.{ "mcpServers": { "oxbow": { "command": "npx", "args": ["oxbowui-mcp"] } } }Install Oxbow blocks into Astro projects using the oxbowui CLI
mainThe
oxbowuiCLI is used to install Oxbow blocks into Astro projects. You can usenpxto run the CLI without a global installation.To see a list of available blocks, use the
listcommand. To add specific blocks, use theaddcommand followed by the block name and a version or index number.npx oxbowui list npx oxbowui add hero 1 npx oxbowui add pricing 3Install Oxbow MCP
mainYou can use the Oxbow MCP server to allow AI tools to browse and install Oxbow blocks directly into your project. You can run it immediately using
npxor install it globally vianpm.npx oxbowui-mcpnpm install -g oxbowui-mcpInstall oxbowui-mcp
mainYou can install the
oxbowui-mcpModel Context Protocol server globally via npm or run it directly usingnpx.npm install -g oxbowui-mcpOr run with npx:
npx oxbowui-mcpConfigure Oxbow MCP in Cursor
mainTo use Oxbow with Cursor, add the
oxbowserver configuration to your.cursor/mcp.jsonfile. After saving the file, restart Cursor or reload the MCP servers to activate the tools.{ "mcpServers": { "oxbow": { "command": "npx", "args": ["oxbowui-mcp"] } } }Use the Commandbar (Variant 2) component
mainThe
commandbar-02component is an application-level UI block designed for quick navigation and command execution. It features a search input, a list of filtered commands with icons and descriptions, and support for keyboard shortcuts, including 'chords' (sequences of keys).Key Features
- Search & Filtering: Real-time filtering of commands based on text matching (exact, prefix, or subsequence).
- Keyboard Shortcuts:
⌘Kor/to open the command bar and focus the input.Escto close.Arrow Up/Downto navigate results.Enterto select a command.- Chords: Supports multi-key sequences (e.g., pressing
WthenCto trigger a specific command).
- Recent Items: A section to display recent requests or items.
Component Metadata
- Name:
commandbar-02 - Aliases:
commandbar,commandbar 2,commandbar 02 - Category:
application - Section:
commandbar - Variant:
2
Implementation Details
This component is implemented as an
.astrofile and uses Alpine.js for client-side interactivity. It relies on ago(href)function to handle navigation when a command is selected.// The component is located at: // oxbow/application/commandbar/02.astroUse the 'Invite team members' modal component
mainThe
modals-01component is an application-level modal designed to invite team members to an account. It includes a form for email input, role selection (Viewer, Editor, Admin), department selection, and expiration settings. It features a success state that displays after a successful submission.Programmatic Usage
To control the modal programmatically, you can use the following methods:
- Open the modal: Dispatch a custom event named
open-invite-modalor call the Alpine.js$refs.show()method. - Close the modal: Call the Alpine.js
close()method.
Note: When using the component, ensure the
openproperty in thex-dataobject is set totrueif you want it visible by default, or manage it via the methods above.// To open the modal from outside the component scope: window.dispatchEvent(new CustomEvent('open-invite-modal')); // Or if accessing via an Alpine component instance: // $refs.show();- Open the modal: Dispatch a custom event named
Use the commandbar-05 component
mainThe
commandbar-05is an application-level component designed as a command bar/search interface. It allows users to search through files, people, and updates using a subsequence search algorithm.Key Features:
- Search & Filtering: Supports global search and category tabs (
all,files,people,updates). - Pinning: Users can pin specific items to keep them prioritized in search results. Pinned items are persisted in
localStorageunder the keyoxbow-cmd5-pins. - Keyboard Navigation: Full keyboard support for searching, navigating results, pinning, and copying links.
- Preview Pane: Displays a preview of the selected item.
Component Metadata:
- Name:
commandbar-05 - Aliases:
commandbar,commandbar 5,commandbar 05 - Category:
application - Section:
commandbar - Variant:
5 - File Path:
oxbow/application/commandbar/05.astro
- Search & Filtering: Supports global search and category tabs (
Start the Oxbow MCP server
mainThe Oxbow MCP server is designed to run via standard input/output (stdio). You can start the server by executing the entrypoint file directly using Node.js. This is typically done when configuring an MCP client (like Claude Desktop) to connect to the server.
node /path/to/oxbowui-mcp/packages/mcp/src/index.jsUse the Commandbar component (commandbar-01)
mainThe
commandbar-01is an application-level UI component designed for quick actions and navigation. It features a searchable command interface with keyboard shortcuts, icon support, and single-letter hotkeys.Key Features
- Activation Shortcuts: Open the command bar using
⌘K(orCtrl+K) or by typing/. - Navigation: Use
↑and↓arrow keys to navigate results and↵(Enter) to select. - Single-letter Hotkeys: Each option can define a single-letter shortcut (e.g.,
Nfor 'New Project') that triggers the action immediately when pressed. - Custom Events: When an item is selected, the component dispatches a
cmd:chooseCustomEvent containing the selected item's data.
Integration via Custom Events
To respond to user selections in your application, listen for the
cmd:chooseevent on thewindowobject.window.addEventListener('cmd:choose', (event) => { const selectedItem = event.detail; console.log('User chose:', selectedItem.id, selectedItem.href); // Handle navigation or action here });window.addEventListener('cmd:choose', (event) => { const selectedItem = event.detail; console.log('User chose:', selectedItem.id, selectedItem.href); });- Activation Shortcuts: Open the command bar using
Use the Oxbow CLI to manage UI blocks
mainOxbow is a CLI tool used to list and add UI blocks (components) to Astro projects. You can run it using
npx oxbow.Commands
oxbow list: Displays available components grouped by section.oxbow add <name|alias> [variant]: Adds a specific component or variant to your project.oxbow add --all: Adds all available components to your project.
Flags
--json: (Forlistcommand) Outputs the component registry as a JSON object.--yesor-y: (Foraddcommand) Overwrites existing files in thesrc/componentsdirectory.--allor-a: (Foraddcommand) Targets all components in the registry.--cwd <path>: Sets the working directory where components should be added (defaults to current directory).
# List available components npx oxbow list # Add a specific component variant npx oxbow add hero 1 # Add a component by name/alias npx oxbow add marketing-heros-01 # Add all components, overwriting existing files npx oxbow add --all --yes # List components in JSON format npx oxbow list --json