CategoryTiles
Tiles with an icon that lead to the parts of a page.
import { CategoryTiles } from '@iffday/web/src/kit';Example
The four entrances at the top of the community page: an icon above a name, each tile at least 150px wide, filling the row. On phones they become a sideways-scrolling row of 136px tiles. meta adds a grey line under the name.
import { useT } from '@iffday/i18n';
import { CategoryTiles } from '@iffday/web/src/kit';
import { Activity, FilePen, Trophy, Users } from 'lucide-react';
/** The four entrances at the top of the community page. */
export default function Example() {
const t = useT();
return (
<div style={{ width: '100%' }}>
<CategoryTiles
items={[
{
to: '/components/review-card',
label: t('review.community.feed'),
icon: <Activity size={22} strokeWidth={1.6} />,
},
{
to: '/components/short-review',
label: t('review.community.articlesAndViews'),
icon: <FilePen size={22} strokeWidth={1.6} />,
},
{
to: '/components/avatar',
label: t('review.community.creators'),
icon: <Users size={22} strokeWidth={1.6} />,
meta: '24',
},
{
to: '/components/rating-histogram',
label: t('review.community.audienceRankings'),
icon: <Trophy size={22} strokeWidth={1.6} />,
},
]}
/>
</div>
);
}Props
CategoryTiles
apps/web/src/kit.tsx:332| Prop | Type | Default |
|---|---|---|
items* | { to: string; label: string; icon: ReactNode; meta?: ReactNode }[] |