HextaUI

Item: Right to left

Padding, separator insets and the chevron follow the reading direction.

import { IconBell, IconUserCircle } from "@tabler/icons-react"

import {
  Item,
  ItemChevron,
  ItemContent,
  ItemDescription,
  ItemGroup,
  ItemMedia,
  ItemTitle,
} from "@/components/ui/item"

export function ItemRtl() {
  return (
    <div dir="rtl" className="w-full max-w-sm">
      <ItemGroup variant="grouped">
        <Item size="sm" render={<a href="#" />}>
          <ItemMedia variant="icon">
            <IconUserCircle />
          </ItemMedia>
          <ItemContent>
            <ItemTitle>الملف الشخصي</ItemTitle>
            <ItemDescription>الاسم والصورة</ItemDescription>
          </ItemContent>
          <ItemChevron />
        </Item>
        <Item size="sm" render={<a href="#" />}>
          <ItemMedia variant="icon">
            <IconBell />
          </ItemMedia>
          <ItemContent>
            <ItemTitle>الإشعارات</ItemTitle>
            <ItemDescription>الإشارات والردود</ItemDescription>
          </ItemContent>
          <ItemChevron />
        </Item>
      </ItemGroup>
    </div>
  )
}

This adds the example as components/examples/item/rtl.tsx, together with the Item component and the HextaUI theme tokens it needs.

pnpm dlx shadcn@latest add https://hextaui.com/r/item-rtl.json

To add only the component, follow the Item installation.

Props in this example

The Item props this example sets, from the API reference.

PropTypeDefault
size
"default" | "sm" | "xs""default"
render
ReactElement | (props, state) => ReactElement<div>
PropTypeDefault
variantgrouped puts items on one surface with automatic separators.
"default" | "grouped""default"
PropTypeDefault
varianticon puts the icon on a tile and hides it from screen readers. image crops to a square. Both have corners concentric with the item.
"default" | "icon" | "image""default"

Every prop is in the Item API reference.

See them all, with keyboard support and accessibility notes, on the Item page.