BNA

BNA UI
24

A foundational View component with transparent background and ref forwarding support.

Installation

pnpm dlx bna-ui add view

Usage

import { View } from '@/components/ui/view';
<View style={{ padding: 16 }}>
  <Text>Content inside view</Text>
</View>

Examples

Default

API Reference

View

A wrapper around React Native's View with consistent styling defaults and ref forwarding.

PropTypeDefaultDescription
styleViewStyle{ backgroundColor: 'transparent' }Styles for the view container.
childrenReactNode-Content to display inside the view.
refReact.Ref<RNView>-Ref to the underlying React Native View.

Additional Props

The View component accepts all props from React Native's View component.

Ref Forwarding

The component uses forwardRef to provide access to the underlying View: