CraftUI

Blocks

Whole screens built from CraftUI's components, ready to fill with your data.

A block is a whole screen, such as a main menu or a server browser, built from CraftUI's components and laid out as Ore UI's screens are. Install one, and it's yours to change, like any shadcn/ui block.

Blocks take your data and your handlers as props, and never call a game or a server. They keep only what's on screen, such as a search box's text.

Install a block

Blocks install into components/craft/blocks, along with the components they use:

npx shadcn@latest add @runqora/craft-server-browser

Fill the window

Every block is a Screen, which fills its frame. For a whole page, give it the window's height:

<ServerBrowser className="h-dvh" onJoin={join} servers={servers} />

Screens are containers, so their layouts follow their own width, not the window's. Each block's page has a link to see it on a page of its own.

The blocks

BlockWhat it's for
Main MenuThe first screen, with Play and other choices
Settings ScreenSettings, built from a list
Server BrowserFinding and joining a server
World BrowserPicking, creating and deleting worlds
Inventory ScreenA backpack and a hotbar
Profile ScreenA player's profile and achievements
Confirmation DialogAsking before something can't be undone
Game DashboardWatching and controlling a world
Multiplayer LobbyGetting players ready before a game
MarketplaceBrowsing and buying content

They're all built on Screen, which you can use for your own.

On this page