Code at the speed of thought – Zed is a high-performance, multiplayer code editor from the creators of Atom and Tree-sitter.
Start on ui root doc
Nate Butler740e2cc5bfbf
diff --git a/crates/ui2/src/lib.rs b/crates/ui2/src/lib.rsindex 5d0a57c6d90..fb25d21bf05 100644--- a/crates/ui2/src/lib.rs+++ b/crates/ui2/src/lib.rs@@ -9,6 +9,37 @@//!//! Expect some inconsistencies from component to component as we work out the best way to build these components.//!+//! ## Getting Started+//!+//! This is a quick primer to get you started using the UI components.+//!+//! You shouldn't need to construct an element from scratch very often. If you find+//! yourself manually styling things like hover, text colors, etc, you should+//! probably check that there isn't already a base component for whatever you are building.+//!+//! Here is an into to some of the most common elements:+//!+//! ### Text+//!+//! For generic UI text most frequently you will use a [`Label`] component.+//!+//! ```rust+//! use ui2::prelude::*;+//! use ui2::{Label, LabelColor};+//!+//! pub fn render_some_ui_text<V: 'static>() -> impl Component<V> {+//! div().p_2().child(+//! Label::new("Hello World")+//! .color(LabelColor::Muted)+//! )+//! }+//! ```+//!+//! ### Interactive Elements+//!+//! - Icon: To make an icon interactive, use [`IconButton`].+//! - Button: To make a button interactive, use [`Button`].+//!//! ## Design Philosophy//!//! Work in Progress!