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-browserFill 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
| Block | What it's for |
|---|---|
| Main Menu | The first screen, with Play and other choices |
| Settings Screen | Settings, built from a list |
| Server Browser | Finding and joining a server |
| World Browser | Picking, creating and deleting worlds |
| Inventory Screen | A backpack and a hotbar |
| Profile Screen | A player's profile and achievements |
| Confirmation Dialog | Asking before something can't be undone |
| Game Dashboard | Watching and controlling a world |
| Multiplayer Lobby | Getting players ready before a game |
| Marketplace | Browsing and buying content |
They're all built on Screen, which you can use for your own.