# Bundle ## `Text2dBundle` ```rust pub struct Text2dBundle { /// Contains the text. /// /// With `Text2dBundle` the alignment field of `Text` only affects the internal alignment of a block of text and not its /// relative position which is controlled by the `Anchor` component. /// This means that for a block of text consisting of only one line that doesn't wrap, the `alignment` field will have no effect. pub text: Text, /// Cached buffer for layout with cosmic-text pub buffer: CosmicBuffer, /// How the text is positioned relative to its transform. /// /// `text_anchor` does not affect the internal alignment of the block of text, only /// its position. pub text_anchor: Anchor, /// The maximum width and height of the text. pub text_2d_bounds: TextBounds, /// The transform of the text. pub transform: Transform, /// The global transform of the text. pub global_transform: GlobalTransform, /// The visibility properties of the text. pub visibility: Visibility, /// Inherited visibility of an entity. pub inherited_visibility: InheritedVisibility, /// Algorithmically-computed indication of whether an entity is visible and should be extracted for rendering pub view_visibility: ViewVisibility, /// Contains the size of the text and its glyph's position and scale data. Generated via [`TextPipeline::queue_text`] pub text_layout_info: TextLayoutInfo, /// Marks that this is a [`SpriteSource`]. /// /// This is needed for visibility computation to work properly. pub sprite_source: SpriteSource, } ``` ## Proposal 1: New Text2d Component (Selected) Note that this will be informed by <https://github.com/bevyengine/bevy/issues/14854>. ```rust #[derive(Component)] #[require( CosmicBuffer, Anchor, TextBounds, Transform, Visibility, TextLayoutInfo, SpriteSource, )] struct Text2d(String); ```