# Separator (/docs/native/components/separator)

<Preview id="separator/orientations" title={null} />

## Installation [#installation]

<ComponentInstall name="separator" />

## Usage [#usage]

```tsx title="app/index.tsx"
import { Separator } from "@/components/ui/separator";
import { Text } from "@/components/ui/text";
import { View } from "react-native";

export default function Example() {
  return (
    <View className="flex-1 justify-center gap-4 p-4">
      <Text.Paragraph>Account</Text.Paragraph>
      <Separator />
      <Text.Paragraph>Privacy</Text.Paragraph>
    </View>
  );
}
```

## Orientations [#orientations]

<Preview id="separator/orientations" />

```tsx
<Separator />
<Separator orientation="vertical" />
```

## Weight and colour [#weight-and-colour]

A filled box rather than a border, so thickness, colour and radius are ordinary utilities.

<Preview id="separator/weight-and-colour" />

```tsx
<Separator className="h-0.5" />
<Separator className="h-1 rounded-full bg-destructive" />
```

## Stretching to a parent [#stretching-to-a-parent]

The long axis is `self-stretch`, so a vertical rule takes its parent row's height with no height of
its own.

```tsx
<View className="flex-row items-stretch">
  <View className="flex-1 p-4">
    <Text.Caption>Components</Text.Caption>
  </View>
  <Separator orientation="vertical" />
  <View className="flex-1 p-4">
    <Text.Caption>Packages</Text.Caption>
  </View>
</View>
```

## Inside a ListGroup [#inside-a-listgroup]

<Preview id="separator/inside-a-list-group" />

```tsx
<ListGroup>
  <ListGroup.Item>Automatic inset divider below</ListGroup.Item>
  <ListGroup.Item>Hand-placed full-bleed rule below</ListGroup.Item>
  <Separator />
  <ListGroup.Item>Last row</ListGroup.Item>
</ListGroup>
```

A hand-placed separator suppresses the automatic divider at that gap, which is how a full-bleed rule
gets in among inset ones.

## API Reference [#api-reference]

### SeparatorProps [#separatorprops]

Extends React Native's `ViewProps`.

<TypeTable
  type={{
    orientation: {
      type: '"horizontal" | "vertical"',
      default: '"horizontal"',
    },
    className: { type: "string" },
  }}
/>
