Components
Import every component from starlight-warcraft/react. Each one passes the usual HTML attributes through to its
element, and appends your className after its own.
Button
Section titled “Button”<Button>Accept quest</Button><Button variant="frame" size="sm">Small frame</Button><Button asChild> <a href="/start/">A link styled as a button</a></Button>| Prop | Values | Default |
|---|---|---|
variant |
"default", "frame" |
"default" |
size |
"default", "sm" |
"default" |
asChild |
boolean |
false |
asChild styles the only child (a link, say) instead of rendering a button.
<Card> <CardHeader> <CardTitle>The Old Road</CardTitle> <CardDescription>Recommended level 12</CardDescription> </CardHeader> <CardContent>Follow the road east to the watchtower.</CardContent> <CardFooter> <Button size="sm">Accept</Button> </CardFooter></Card>Card takes size: "default" or "sm". CardHeader, CardTitle, CardDescription, CardContent and
CardFooter are plain divs with the matching class.
Banner
Small| Prop | Values | Default |
|---|---|---|
variant |
"default", "secondary", "destructive", "outline" |
"default" |
size |
"default", "sm", "lg" |
"default" |
shape |
"default", "shield", "banner" |
"default" |
<Input placeholder="Search the archives" />A tooltip-style panel with an item-quality border.
<Panel quality="epic">Epic</Panel>quality is "common" (the default), "uncommon", "rare", "epic" or "legendary". panelClassName(quality)
returns the same classes for elements you render yourself, such as a hover card.
HoverCard
Section titled “HoverCard”The card that HoverCards shows when you hover a name in a checked Luau code block, or a link you give it a source
for. Its quality picks the border, and error turns the title red.
local frame: FrameCreateFrame(frameType: string): FrameUnknown global 'GetQuestLogTitle'<HoverCard card={{ title: "CreateFrame", kind: "Function · typed", body: "CreateFrame(frameType: string): Frame", quality: "rare" }} />Mount <HoverCards client:idle /> once per page to show these on hover. Pass sources for your own anchors.
Disclaimer
Section titled “Disclaimer”An unofficial community project. World of Warcraft and Blizzard Entertainment are trademarks of Blizzard Entertainment, Inc.; this site is not affiliated with or endorsed by Blizzard. Code under the MIT licence.
<Disclaimer licence="Code under the MIT licence." />Skeleton
Section titled “Skeleton”<Skeleton style={{ height: "4rem" }} />Spinner
Section titled “Spinner”<Spinner aria-label="Searching" />The spinner has role="status" and the label “Loading” unless you pass aria-label. It stops animating when the
reader prefers reduced motion.