pub struct ThemeTokens {Show 56 fields
pub background: Hsla,
pub foreground: Hsla,
pub card: Hsla,
pub card_foreground: Hsla,
pub popover: Hsla,
pub popover_foreground: Hsla,
pub muted: Hsla,
pub muted_foreground: Hsla,
pub accent: Hsla,
pub accent_foreground: Hsla,
pub primary: Hsla,
pub primary_foreground: Hsla,
pub secondary: Hsla,
pub secondary_foreground: Hsla,
pub destructive: Hsla,
pub destructive_foreground: Hsla,
pub border: Hsla,
pub input: Hsla,
pub ring: Hsla,
pub radius_sm: Pixels,
pub radius_md: Pixels,
pub radius_lg: Pixels,
pub radius_xl: Pixels,
pub shadow_xs: BoxShadow,
pub shadow_sm: BoxShadow,
pub shadow_md: BoxShadow,
pub shadow_lg: BoxShadow,
pub shadow_xl: BoxShadow,
pub ring_offset: Pixels,
pub transition_fast: Duration,
pub transition_base: Duration,
pub transition_slow: Duration,
pub font_family: SharedString,
pub font_mono: SharedString,
pub spacing_1: Pixels,
pub spacing_2: Pixels,
pub spacing_3: Pixels,
pub spacing_4: Pixels,
pub spacing_5: Pixels,
pub spacing_6: Pixels,
pub spacing_8: Pixels,
pub spacing_10: Pixels,
pub spacing_12: Pixels,
pub spacing_16: Pixels,
pub duration_fastest: Duration,
pub duration_faster: Duration,
pub duration_fast: Duration,
pub duration_normal: Duration,
pub duration_slow: Duration,
pub duration_slower: Duration,
pub duration_slowest: Duration,
pub z_dropdown: u32,
pub z_sticky: u32,
pub z_modal: u32,
pub z_popover: u32,
pub z_tooltip: u32,
}Expand description
Shadcn-inspired semantic color and layout tokens
Fields§
§background: Hsla§foreground: Hsla§card: Hsla§card_foreground: Hsla§popover: Hsla§popover_foreground: Hsla§muted: Hsla§muted_foreground: Hsla§accent: Hsla§accent_foreground: Hsla§primary: Hsla§primary_foreground: Hsla§secondary: Hsla§secondary_foreground: Hsla§destructive: Hsla§destructive_foreground: Hsla§border: Hsla§input: Hsla§ring: Hsla§radius_sm: Pixels§radius_md: Pixels§radius_lg: Pixels§radius_xl: Pixels§shadow_xs: BoxShadow§shadow_sm: BoxShadow§shadow_md: BoxShadow§shadow_lg: BoxShadow§shadow_xl: BoxShadow§ring_offset: Pixels§transition_fast: Duration§transition_base: Duration§transition_slow: Duration§font_family: SharedString§font_mono: SharedString§spacing_1: Pixels§spacing_2: Pixels§spacing_3: Pixels§spacing_4: Pixels§spacing_5: Pixels§spacing_6: Pixels§spacing_8: Pixels§spacing_10: Pixels§spacing_12: Pixels§spacing_16: Pixels§duration_fastest: Duration§duration_faster: Duration§duration_fast: Duration§duration_normal: Duration§duration_slow: Duration§duration_slower: Duration§duration_slowest: Duration§z_dropdown: u32§z_sticky: u32§z_modal: u32§z_popover: u32§z_tooltip: u32Implementations§
Source§impl ThemeTokens
impl ThemeTokens
pub fn light() -> Self
pub fn dark() -> Self
pub fn midnight_blue() -> Self
pub fn forest_grove() -> Self
pub fn sunset_amber() -> Self
pub fn ocean_breeze() -> Self
pub fn dracula() -> Self
pub fn nord() -> Self
pub fn monokai_pro() -> Self
pub fn tokyo_night() -> Self
pub fn catppuccin_mocha() -> Self
pub fn rose_pine() -> Self
pub fn coral_reef() -> Self
pub fn lavender_dreams() -> Self
pub fn mint_fresh() -> Self
pub fn peachy_keen() -> Self
pub fn sky_blue() -> Self
pub fn cherry_blossom() -> Self
Source§impl ThemeTokens
impl ThemeTokens
pub fn gradient_primary(&self) -> Background
pub fn gradient_surface(&self) -> Background
pub fn gradient_accent(&self) -> Background
pub fn gradient_destructive(&self) -> Background
pub fn glow_shadow(&self, color: Hsla, intensity: f32) -> BoxShadow
pub fn colored_shadow(&self, color: Hsla, size: f32) -> BoxShadow
pub fn focus_ring_animated(&self, progress: f32) -> BoxShadow
Sourcepub fn focus_ring(&self, opacity: f32) -> BoxShadow
pub fn focus_ring(&self, opacity: f32) -> BoxShadow
Create a focus ring shadow (3px spread with opacity)
Sourcepub fn focus_ring_light(&self) -> BoxShadow
pub fn focus_ring_light(&self) -> BoxShadow
Create a focus ring for light backgrounds
Sourcepub fn focus_ring_dark(&self) -> BoxShadow
pub fn focus_ring_dark(&self) -> BoxShadow
Create a focus ring for dark backgrounds
Sourcepub fn error_ring(&self) -> BoxShadow
pub fn error_ring(&self) -> BoxShadow
Create a validation error ring
Sourcepub fn success_ring(&self) -> BoxShadow
pub fn success_ring(&self) -> BoxShadow
Create a success ring (for validated inputs)
pub fn inset_shadow_top(&self, intensity: f32) -> BoxShadow
pub fn inset_shadow_bottom(&self, intensity: f32) -> BoxShadow
pub fn inset_shadow_both(&self, intensity: f32) -> Vec<BoxShadow>
pub fn elevation_shadow(&self, level: u8) -> Vec<BoxShadow>
pub fn layered_gradient(&self, angle: f32, colors: &[Hsla]) -> Vec<Background>
Trait Implementations§
Source§impl Clone for ThemeTokens
impl Clone for ThemeTokens
Auto Trait Implementations§
impl Freeze for ThemeTokens
impl RefUnwindSafe for ThemeTokens
impl Send for ThemeTokens
impl Sync for ThemeTokens
impl Unpin for ThemeTokens
impl UnsafeUnpin for ThemeTokens
impl UnwindSafe for ThemeTokens
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
Source§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Convert
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>. Box<dyn Any> can
then be further downcast into Box<ConcreteType> where ConcreteType implements Trait.Source§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Convert
Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> can then be
further downcast into Rc<ConcreteType> where ConcreteType implements Trait.Source§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
Convert
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.Source§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
Convert
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.Source§impl<T> DowncastSync for T
impl<T> DowncastSync for T
impl<S, T> Duplex<S> for Twhere
T: FromSample<S> + ToSample<S>,
Source§impl<S> FromSample<S> for S
impl<S> FromSample<S> for S
fn from_sample_(s: S) -> S
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more