Pills & Chips
Seletores e filtros interativos do app — Trip Mode Pills, Service Selector e Date Chips com tokens reais.
Trip Mode Pills
Service Selector
Passagens
Passeios
Shows
eSIM
Date Chips
Pills & Chips
Clique nos itens à esquerda para alternar os estados ativos.
Trip Mode Pills
Seletor do tipo de viagem na tela Home (Ida e volta / Só ida). Pill sem borda, fundo transparente no estado inativo e azul translúcido no ativo.
Home/tripModePillVariants: Inactive, Active — screens/Home/styles.js
Ida e volta
InactiveIda e volta
ActiveSó ida
InactiveSó ida
Active| Propriedade | Valor | Descrição |
|---|---|---|
height | 36px | |
paddingHorizontal | 16px | |
borderRadius | 999px | Pill perfeito |
backgroundColor (inactive) | transparent | Sem fundo |
backgroundColor (active) | rgba(68,148,252,0.2) | Azul translúcido |
border | nenhuma (nenhum estado) | Sem borda em qualquer estado |
color (inactive) | rgba(255,255,255,0.3) | Branco 30% |
color (active) | colors.white (#FFFFFF) | |
fontSize | 14px | Semibold nos dois estados |
fontFamily | Semibold |
tsx
copy
// screens/Home/styles.js
tripModePill: {
height: 36,
paddingHorizontal: 16,
borderRadius: 999,
justifyContent: 'center',
alignItems: 'center',
},
tripModePillActive: {
backgroundColor: 'rgba(68, 148, 252, 0.2)',
},
tripModeText: {
fontSize: 14,
color: 'rgba(255, 255, 255, 0.3)',
fontFamily: Semibold,
textAlign: 'center',
},
tripModeTextActive: {
color: colors.white,
},
// Uso:
<Pressable
style={[
styles.tripModePill,
isActive && styles.tripModePillActive,
]}
onPress={() => setTripMode(mode)}
>
<Text style={[styles.tripModeText, isActive && styles.tripModeTextActive]}>
{label}
</Text>
</Pressable>Service Selector
Botões de ícone 48×48 na tela Home para selecionar o serviço de busca. Estado inativo com fundo branco translúcido; ativo com azul sólido; desabilitado com 45% de opacidade.
Home/serviceSelectorButtonVariants: Inactive, Active, Disabled — screens/Home/styles.js
Passagens
Passagens
Passeios
Shows
eSIM
| Propriedade | Valor | Descrição |
|---|---|---|
width / height | 48px | |
borderRadius | 12px | radius.md |
backgroundColor (inactive) | rgba(255,255,255,0.12) | |
borderWidth (inactive) | 1px | |
borderColor (inactive) | rgba(255,255,255,0.08) | |
backgroundColor (active) | colors.embarko_blue (#4494FC) | |
borderColor (active) | transparent | |
opacity (disabled) | 0.45 | |
label marginTop | 10px | |
label fontSize | 14px | |
label color (inactive) | colors.white80 (rgba(255,255,255,0.80)) | Medium |
label color (active) | colors.white (#FFFFFF) | Semibold |
label color (disabled) | rgba(255,255,255,0.40) |
tsx
copy
// screens/Home/styles.js
serviceSelectorButton: {
width: 48,
height: 48,
borderRadius: 12,
backgroundColor: 'rgba(255,255,255,0.12)',
borderWidth: 1,
borderColor: 'rgba(255,255,255,0.08)',
alignItems: 'center',
justifyContent: 'center',
},
serviceSelectorButtonActive: {
backgroundColor: colors.embarko_blue,
borderColor: 'transparent',
},
serviceSelectorButtonDisabled: {
opacity: 0.45,
},
serviceSelectorLabel: {
marginTop: 10,
fontSize: 14,
color: colors.white80,
fontFamily: Medium,
textAlign: 'center',
},
serviceSelectorLabelActive: {
color: colors.white,
fontFamily: Semibold,
},
serviceSelectorLabelDisabled: {
color: 'rgba(255,255,255,0.40)',
},
// Uso:
const SERVICES = [
{ key: 'passagens', label: 'Passagens', icon: 'flight' },
{ key: 'passeios', label: 'Passeios', icon: 'explore' },
{ key: 'shows', label: 'Shows', icon: 'music_note' },
{ key: 'esim', label: 'eSIM', icon: 'sim_card' },
];
{SERVICES.map((svc) => {
const isActive = activeService === svc.key;
const isDisabled = disabledServices.includes(svc.key);
return (
<Pressable
key={svc.key}
style={[
styles.serviceSelectorButton,
isActive && styles.serviceSelectorButtonActive,
isDisabled && styles.serviceSelectorButtonDisabled,
]}
onPress={() => !isDisabled && setActiveService(svc.key)}
>
<MaterialIcons name={svc.icon} size={22} color={colors.white} />
<Text style={[
styles.serviceSelectorLabel,
isActive && styles.serviceSelectorLabelActive,
isDisabled && styles.serviceSelectorLabelDisabled,
]}>
{svc.label}
</Text>
</Pressable>
);
})}Date Chips
Chips de data usados no Rastreador de Preços (Ontem / Hoje / Amanhã). Altura equivalente ao inputHeight (54px), borda azul no estado ativo.
Rastreador/dateChipVariants: Default, Active — baseado nos tokens de DESIGN.md
Ontem
DefaultHoje
ActiveAmanhã
Default| Propriedade | Valor | Descrição |
|---|---|---|
height | inputHeight (54px) | Token compartilhado com inputs |
borderRadius | radius.sm (8px) | |
borderWidth | 1px | |
backgroundColor (default) | colors.white10 (rgba(255,255,255,0.10)) | |
borderColor (default) | colors.white10 (rgba(255,255,255,0.10)) | |
backgroundColor (active) | rgba(68,148,252,0.2) | |
borderColor (active) | colors.inputBorderFocused (#4494FC) | |
fontSize | 16px | |
fontFamily (default) | Medium | |
fontFamily (active) | Semibold | |
color (default) | colors.white60 (rgba(255,255,255,0.60)) | |
color (active) | colors.white (#FFFFFF) |
tsx
copy
// Rastreador — date chip
const DATE_CHIPS = ['Ontem', 'Hoje', 'Amanhã'];
{DATE_CHIPS.map((chip) => {
const isActive = selectedDate === chip;
return (
<Pressable
key={chip}
style={[
styles.dateChip,
isActive && styles.dateChipActive,
]}
onPress={() => setSelectedDate(chip)}
>
<Text style={[styles.dateChipText, isActive && styles.dateChipTextActive]}>
{chip}
</Text>
</Pressable>
);
})}
// StyleSheet:
dateChip: {
height: inputHeight, // 54
borderRadius: radius.sm, // 8
borderWidth: 1,
backgroundColor: colors.white10,
borderColor: colors.white10,
paddingHorizontal: 20,
justifyContent: 'center',
alignItems: 'center',
},
dateChipActive: {
backgroundColor: 'rgba(68,148,252,0.2)',
borderColor: colors.inputBorderFocused, // #4494FC
},
dateChipText: {
fontSize: 16,
fontFamily: Medium,
color: colors.white60,
},
dateChipTextActive: {
fontFamily: Semibold,
color: colors.white,
},