Skip to content

TkxCard

import { TkxCard, TkxCardHeader, TkxCardBody, TkxCardFooter } from 'tekivex-ui';
<TkxCard>
<TkxCardHeader title="Account settings" subtitle="Update your details" />
<TkxCardBody>
{/* … */}
</TkxCardBody>
<TkxCardFooter>
<TkxButton>Save</TkxButton>
</TkxCardFooter>
</TkxCard>
Default surface — clean and minimal.
Outlined — border-only.
Elevated — drop-shadow lift.
<TkxCard>
<TkxCardBody>Default surface — clean and minimal.</TkxCardBody>
</TkxCard>
Header + body + footer

Account settings

Update your profile details

Name, email, password, two-factor authentication, and connected services. Changes save automatically.
Composed with other components

API key

rotates every 90 days

active
tkx_•••••••••••••••••8a3f
<TkxCard padding="sm">Compact</TkxCard>
<TkxCard padding="md">Default</TkxCard>
<TkxCard padding="lg">Roomy</TkxCard>

TkxCard and its sub-components use no hooks or browser APIs. They render in Next.js Server Components without 'use client':

// app/dashboard/page.tsx — Server Component
import { TkxCard, TkxCardBody } from 'tekivex-ui';
export default async function Page() {
const data = await fetch('https://api/...').then(r => r.json());
return (
<TkxCard>
<TkxCardBody>{data.message}</TkxCardBody>
</TkxCard>
);
}
PropTypeRequiredDescription
variant'default' | 'outlined' | 'glass' | 'elevated'Visual style. Defaults to default.
padding'sm' | 'md' | 'lg'Inner spacing. Defaults to md.
asReact.ElementTypeOverride the rendered element (default <article>).
PropTypeRequiredDescription
titleReactNodeTitle row — text or composed element.
subtitleReactNodeSubtitle below the title.
actionReactNodeTrailing action slot (e.g. menu button).

Both accept any ReactNode children and forward style / className.

  • Renders as <article> by default — semantic landmark.
  • No interactive role unless you nest a button or link inside.
  • Avoid wrapping the entire card in onClick; nest a <TkxButton as="a"> or <a> instead, so screen-reader users get the right cue.

src/components/TkxCard.tsx