diff --git a/docs/api.md b/docs/api.md index b35a7fb1..2ac80297 100644 --- a/docs/api.md +++ b/docs/api.md @@ -155,6 +155,7 @@ The `SpatialNavigationView` component receives the following props: | Name | Type | Default | Description | | ----------- | ---------------------------- | -------------- | ---------------------------------------------------------------------------------------------------------- | | `direction` | `'horizontal' \| 'vertical'` | `'horizontal'` | The orientation of the `SpatialNavigationNode`. | +| `alignInGrid` | `boolean` | `false` | Determines whether child lists should behave like a grid. | | | `style` | `ViewStyle` | `null` | Style for the View. This can be any valid React Native style object. | | `children` | `ReactNode` | `null` | Child elements of the component. They are expected to be one or multiple `SpatialNavigationNode` elements. | diff --git a/packages/lib/src/spatial-navigation/components/View.tsx b/packages/lib/src/spatial-navigation/components/View.tsx index ea373776..b21a7dcb 100644 --- a/packages/lib/src/spatial-navigation/components/View.tsx +++ b/packages/lib/src/spatial-navigation/components/View.tsx @@ -3,15 +3,17 @@ import { SpatialNavigationNode } from './Node'; export const SpatialNavigationView = ({ direction = 'horizontal', + alignInGrid = false, children, style, }: { children: React.ReactNode; style?: ViewStyle; direction: 'horizontal' | 'vertical'; + alignInGrid?: boolean; }) => { return ( - +