Composables
Components Unstyled Icons Colors Compose
Components Unstyled Icons Colors Compose UI Kit UI Blocks SVG to Compose Android Distribution Community Docs Blog
Composable Functions
  • Box
  • Button
  • Column
  • GlanceTheme
  • Image
  • Row
  • Spacer
  • Text
  • action
  • clickable
  • currentState
Classes
  • ActionParameters
  • Alignment
  • ButtonColors
  • ColorFilter
  • ColorProviders
  • CombinedGlanceModifier
  • ContentScale
  • ExperimentalGlanceApi
  • FontFamily
  • FontStyle
  • FontWeight
  • GlanceComposable
  • MutableActionParameters
  • SemanticsConfiguration
  • SemanticsPropertyKey
  • TextAlign
  • TextDecoration
  • TextStyle
  • Visibility
Interfaces
  • Action
  • ColorProvider
  • ColumnScope
  • GlanceId
  • GlanceModifier
  • GlanceStateDefinition
  • ImageProvider
  • RowScope
  • SemanticsPropertyReceiver
Properties
  • GlanceSessionManager
  • LocalContext
  • LocalGlanceId
  • LocalSize
  • LocalState
  • NoRippleOverride
  • contentDescription
  • isNightMode
  • testTag
Functions
  • absolutePadding
  • actionParametersOf
  • actionStartActivity
  • background
  • clickable
  • ColorProvider
  • colorProviders
  • fillMaxHeight
  • fillMaxSize
  • fillMaxWidth
  • height
  • ImageProvider
  • mutableActionParametersOf
  • padding
  • semantics
  • size
  • toMutableParameters
  • toParameters
  • toParametersKey
  • visibility
  • width
  • wrapContentHeight
  • wrapContentSize
  • wrapContentWidth
Jetpack Compose › Glance

width

View Markdown Open in ChatGPT Open in Claude
Function
Android
public fun GlanceModifier.width(width: Dp): GlanceModifier

Sets the absolute width of an element, in Dp.

Android
public fun GlanceModifier.width(@DimenRes width: Int): GlanceModifier

Set the width of a view from the value of a resource.

visibility ← Previous wrapContentHeight Next →
On this page
  • API Reference
Sponsored By
RevenueCat Become a sponsor

Never miss a Compose release

Get an alert the moment a new Compose release is out: new APIs, new components, new things to experiment with. Straight from Google's servers.

Join 3,000+ Compose developers. No spam, ever.