control-bar
aomi/control-barFreeComponent
Control bar with model/App selectors, API key input, and wallet connect.
Install it
npx shadcn@latest add https://aomi.dev/r/control-bar.jsonSource
1"use client";23import type { ReactNode, FC } from "react";4import { cn } from "@aomi-labs/react";5import { NetworkSelect } from "./network-select";6import { ModelSelect } from "./model-select";7import { AppSelect } from "./app-select";8import { ApiKeyInput } from "./api-key-input";9import { ConnectButton } from "./connect-button";10import { SecretInput } from "./secret-input";1112// =============================================================================13// Types14// =============================================================================1516export type ControlBarProps = {17 className?: string;18 /** Custom controls to render alongside built-in ones */19 children?: ReactNode;20 /** Hide the model selector */21 hideModel?: boolean;22 /** Hide the App selector */23 hideApp?: boolean;24 /** Hide the API key input */25 hideApiKey?: boolean;26 /** Hide the wallet connect button (default: true) */27 hideWallet?: boolean;28 /** Hide the network selector (default: false) */29 hideNetwork?: boolean;30 /** Hide the secrets input */31 hideSecrets?: boolean;32};3334// =============================================================================35// Main Component36// =============================================================================3738export const ControlBar: FC<ControlBarProps> = ({39 className,40 children,41 hideModel = false,42 hideApp = false,43 hideApiKey = false,44 hideWallet = true,45 hideNetwork = false,46 hideSecrets = false,47}) => {48 return (49 <div className={cn("flex items-center gap-1", className)}>50 {!hideNetwork && <NetworkSelect />}51 {!hideModel && <ModelSelect />}52 {!hideApp && <AppSelect />}53 {!hideWallet && <ConnectButton />}54 {!hideSecrets && <SecretInput />}55 {children}56 {!hideApiKey && <ApiKeyInput />}57 </div>58 );59};6061// =============================================================================62// Re-exports for granular usage63// =============================================================================6465export { ModelSelect, type ModelSelectProps } from "./model-select";66export { AppSelect, type AppSelectProps } from "./app-select";67export { ApiKeyInput, type ApiKeyInputProps } from "./api-key-input";68export {69 ConnectButton,70 type ConnectButtonProps,71} from "./connect-button";72export { NetworkSelect, type NetworkSelectProps } from "./network-select";73export { SecretInput, type SecretInputProps } from "./secret-input";
What it pulls in
npm packages
Other registry items
Files it writes
More from aomi
All 34 items| Component | Registry | Kind | Access | Installs | Command |
|---|---|---|---|---|---|
| accordionaccordion | aomi | Components | Free | 2 deps | |
| alertalert | aomi | Components | Free | 1 dep | |
| aomi-frameaomi-frame | aomi | Components | Free | 1 dep | |
| aomi-para-provideraomi-para-provider | aomi | Components | Free | 9 deps · 27 files | |
| aomi-privy-provideraomi-privy-provider | aomi | Components | Free | 7 deps · 15 files | |
| aomi-wallet-kitaomi-wallet-kit | aomi | Components | Free | 8 deps · 59 files | |
| aomi-widgetaomi-widget | aomi | Components | Free | 2 deps | |
| assistant-threadassistant-thread | aomi | Components | Free | 6 deps · 23 files |
