HkAddTile is the dashed tile that invites an action — the empty state of a list or a panel, the "add one more" row at the end of a list, the drop zone for files. It is one element with three shapes: the centered block (the default), the slim compact row, and the droppable zone that also accepts file drags.
The page's primary action is a Button or an HkFab; the add tile is for growing the content that is already on the screen.
For a menu of several things to add, use a button with a menu; the tile carries one action.
Import
tsx
1
import{HkAddTile}from"@celestia-island/hikari";
This component ships in the Vue library only; it has no Rust mirror.
Empty state
The default tile is a centered block — glyph above the caption — and the whole tile is the click target. disabled switches it off entirely.
TSX
1
2
3
4
5
6
7
8
9
10
11
import{HkAddTile}from"@celestia-island/hikari";importtype{CSSProperties}from"vue";constrow: CSSProperties={display:"grid",gridTemplateColumns:"1fr 1fr",gap:"12px"};exportdefault()=>(<divstyle={row}><HkAddTile>Addyourfirstsource</HkAddTile>
<HkAddTile disabled>Unavailable in read-only mode</HkAddTile></div>
);
import { HkAddTile } from "@celestia-island/hikari";
import type { CSSProperties } from "vue";
const row: CSSProperties = { display: "grid", gridTemplateColumns: "1fr 1fr", gap: "12px" };
export default () => (
<div style={row}>
<HkAddTile>Add your first source</HkAddTile>
<HkAddTile disabled>Unavailable in read-only mode</HkAddTile>
</div>
);
List end
compact turns the tile into a slim start-aligned row that reads as the last member of a list instead of a button floating under it.
droppable accepts file drags: the tile takes on the drag-over wash while files are over it, and a drop with at least one file emits drop-files with the File[] and the native event. Drops of anything but files are ignored, so the event always carries at least one file. The host decides what the files mean. Note the handler's name: the event is declared drop-files, so in TSX its prop is onDrop-files.